17 if (defined(
'ILIAS_PHPUNIT_CONTEXT'))
19 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
20 ilUnitUtil::performInitialisation();
24 chdir( dirname( __FILE__ ) );
32 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
37 $this->assertInstanceOf(
'ASS_AnswerBinaryState', $instance);
43 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
48 $instance->setState($expected);
49 $actual = $instance->getState();
52 $this->assertEquals($expected, $actual);
58 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
63 $instance->setState($expected);
64 $actual = $instance->isStateChecked();
67 $this->assertEquals($expected, $actual);
73 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
78 $instance->setState($expected);
79 $actual = $instance->isStateSet();
82 $this->assertEquals($expected, $actual);
88 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
93 $instance->setState($expected);
94 $actual = !$instance->isStateUnset();
97 $this->assertEquals($expected, $actual);
103 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
108 $instance->setState($expected);
109 $actual = !$instance->isStateUnchecked();
112 $this->assertEquals($expected, $actual);
118 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
121 $instance->setState($expected);
124 $instance->setChecked();
125 $actual = $instance->isStateUnchecked();
128 $this->assertEquals($expected, $actual);
134 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
137 $instance->setState($expected);
140 $instance->setUnchecked();
141 $actual = $instance->isStateUnchecked();
144 $this->assertEquals($expected, $actual);
150 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
153 $instance->setState($expected);
157 $actual = $instance->isStateUnchecked();
160 $this->assertEquals($expected, $actual);
166 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
169 $instance->setState($expected);
172 $instance->setUnset();
173 $actual = $instance->isStateUnchecked();
176 $this->assertEquals($expected, $actual);