SETestSuite.h
1 /**************************************************************************************
2 Copyright 2015 Applied Research Associates, Inc.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the License
5 at:
6 http://www.apache.org/licenses/LICENSE-2.0
7 Unless required by applicable law or agreed to in writing, software distributed under
8 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9 CONDITIONS OF ANY KIND, either express or implied. See the License for the
10 specific language governing permissions and limitations under the License.
11 **************************************************************************************/
12 
13 #pragma once
14 #include <biogears/cdm/utils/testing/SETestCase.h>
15 
16 CDM_BIND_DECL(TestSuite)
17 
18 namespace biogears{
19 class SETestReport;
20 class BIOGEARS_API SETestSuite : public Loggable {
21  friend SETestReport;
22 
23 protected:
24  SETestSuite(Logger* logger);
25 
26 public:
27  virtual ~SETestSuite();
28 
29  virtual void Reset(); //reset values
30  virtual void Clear(); //clear memory
31 
32  bool Load(const CDM::TestSuite& in);
33  std::unique_ptr<CDM::TestSuite> Unload() const;
34 
35 protected:
36  void Unload(CDM::TestSuite& data) const;
37 
38 public:
39  void SetName(const std::string& Name);
40  std::string GetName() const;
41  const char* GetName_cStr() const;
42 
43  void PerformSuite(bool Performed);
44  bool PerformedSuite();
45 
46  const SEScalarTime& GetDuration() const;
47 
48  std::vector<std::string>& GetRequirements();
49 
50  SETestCase& CreateTestCase();
51  const std::vector<SETestCase*>& GetTestCases() const;
52 
53  int GetNumberOfErrors() const;
54 
55  int GetNumberOfTests() const;
56 
57 protected:
59  std::string m_Name;
60  std::vector<std::string> m_Requirements;
61  std::vector<SETestErrorStatistics*> m_SuiteEqualError;
62  std::vector<SETestCase*> m_TestCase;
64 };
65 }
std::string m_Name
Definition: SETestSuite.h:59
std::vector< SETestCase * > m_TestCase
Definition: SETestSuite.h:62
Definition: Logger.h:27
Definition: Logger.h:75
Definition: SEScalarTime.h:37
Class corresponding to the TestSuite schema type.
Definition: TestReport.hxx:1644
SEScalarTime m_Time
Definition: SETestSuite.h:63
friend SETestReport
Definition: SETestSuite.h:21
bool m_Performed
Definition: SETestSuite.h:58
Definition: SETestCase.h:21
Definition: SETestSuite.h:20
std::vector< SETestErrorStatistics * > m_SuiteEqualError
Definition: SETestSuite.h:61
Definition: SEElectricalCircuit.h:18
std::vector< std::string > m_Requirements
Definition: SETestSuite.h:60