File: test_ChemicalGroupRule.cpp

package info (click to toggle)
libxpertmass 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,908 kB
  • sloc: cpp: 50,586; xml: 2,193; python: 417; ansic: 70; makefile: 33
file content (53 lines) | stat: -rw-r--r-- 1,138 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// ./tests/catch2-tests [section] -s


/////////////////////// Qt includes
#include <QDebug>
#include <QString>
#include <QDir>


/////////////////////// Catch2 includes
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_floating_point.hpp>


/////////////////////// Local includes
#include "TestUtils.hpp"
#include <libXpertMass/ChemicalGroupRule.hpp>

namespace MsXpS
{

namespace libXpertMassCore
{

SCENARIO("ChemicalGroupRule object can be constructed empty",
         "[ChemicalGroupRule]")
{
  WHEN("Constructing an empty ChemicalGroupRule")
  {
    ChemicalGroupRule chemical_group_rule;

    THEN("The object is invalid")
    {
      REQUIRE_FALSE(chemical_group_rule.isValid());
    }

    AND_WHEN("Setting the name, the entity and the fate")
    {
      chemical_group_rule.setName("Acetylation");
      chemical_group_rule.setEntity("LE_PLM_MODIF");
      chemical_group_rule.setFate(Enums::ChemicalGroupFate::LOST);

      THEN("The ChemicalGroupRule is valid.")
      {
        REQUIRE(chemical_group_rule.isValid());
      }
    }
  }
}


} // namespace libXpertMassCore
} // namespace MsXpS