use of org.cerberus.crud.entity.TestCaseStepActionExecution in project cerberus-source by cerberustesting.
the class ControlServiceTest method testDoControlIntegerGreaterWhenSuccess.
@Test
public void testDoControlIntegerGreaterWhenSuccess() {
String property = "10";
String value = "5";
String msg = "'" + property + "' is greater than '" + value + "'.";
TestCaseStepActionControlExecution tcsace = new TestCaseStepActionControlExecution();
tcsace.setControl("verifyNumericGreater");
tcsace.setValue1(property);
tcsace.setValue2(value);
TestCaseStepExecution tcse = new TestCaseStepExecution();
tcse.settCExecution(tCExecution);
TestCaseStepActionExecution tcsae = new TestCaseStepActionExecution();
tcsae.setTestCaseStepExecution(tcse);
tcsace.setTestCaseStepActionExecution(tcsae);
this.controlService.doControl(tcsace);
Assert.assertEquals("OK", tcsace.getReturnCode());
}
use of org.cerberus.crud.entity.TestCaseStepActionExecution in project cerberus-source by cerberustesting.
the class ControlServiceTest method testDoControlStringDifferentWhenSuccess.
@Test
public void testDoControlStringDifferentWhenSuccess() {
String property = "test";
String value = "test success";
String msg = "'" + property + "' is different from '" + value + "'.";
TestCaseStepActionControlExecution tcsace = new TestCaseStepActionControlExecution();
tcsace.setControl("verifyStringDifferent");
tcsace.setValue1(property);
tcsace.setValue2(value);
TestCaseStepExecution tcse = new TestCaseStepExecution();
tcse.settCExecution(tCExecution);
TestCaseStepActionExecution tcsae = new TestCaseStepActionExecution();
tcsae.setTestCaseStepExecution(tcse);
tcsace.setTestCaseStepActionExecution(tcsae);
this.controlService.doControl(tcsace);
Assert.assertEquals(msg, tcsace.getControlResultMessage().getDescription());
Assert.assertEquals("OK", tcsace.getReturnCode());
}
use of org.cerberus.crud.entity.TestCaseStepActionExecution in project cerberus-source by cerberustesting.
the class ControlServiceTest method testDoControlIntegerDifferentWhenFail.
@Test
public void testDoControlIntegerDifferentWhenFail() {
String property = "5";
String value = "5";
String msg = "'" + property + "' is not different from '" + value + "'.";
TestCaseStepActionControlExecution tcsace = new TestCaseStepActionControlExecution();
tcsace.setControl("verifyNumericDifferent");
tcsace.setValue1(property);
tcsace.setValue2(value);
tcsace.setFatal("Y");
TestCaseStepExecution tcse = new TestCaseStepExecution();
tcse.settCExecution(tCExecution);
TestCaseStepActionExecution tcsae = new TestCaseStepActionExecution();
tcsae.setTestCaseStepExecution(tcse);
tcsace.setTestCaseStepActionExecution(tcsae);
this.controlService.doControl(tcsace);
Assert.assertEquals("KO", tcsace.getReturnCode());
Assert.assertEquals("Y", tcsace.getFatal());
}
use of org.cerberus.crud.entity.TestCaseStepActionExecution in project cerberus-source by cerberustesting.
the class ControlServiceTest method testDoControlStringEqualWhenFail.
@Test
public void testDoControlStringEqualWhenFail() {
String property = "test";
String value = "test fail";
String msg = "'" + property + "' is not equal to '" + value + "'.";
TestCaseStepActionControlExecution tcsace = new TestCaseStepActionControlExecution();
tcsace.setControl("verifyStringEqual");
tcsace.setValue1(property);
tcsace.setValue2(value);
tcsace.setFatal("Y");
TestCaseStepExecution tcse = new TestCaseStepExecution();
tcse.settCExecution(tCExecution);
TestCaseStepActionExecution tcsae = new TestCaseStepActionExecution();
tcsae.setTestCaseStepExecution(tcse);
tcsace.setTestCaseStepActionExecution(tcsae);
this.controlService.doControl(tcsace);
Assert.assertEquals(msg, tcsace.getControlResultMessage().getDescription());
Assert.assertEquals("KO", tcsace.getReturnCode());
Assert.assertEquals("Y", tcsace.getFatal());
}
use of org.cerberus.crud.entity.TestCaseStepActionExecution in project cerberus-source by cerberustesting.
the class ControlServiceTest method testDoControlIntegerGreaterWhenFail.
@Test
public void testDoControlIntegerGreaterWhenFail() {
String value1 = "5";
String value2 = "10";
String msg = "'" + value1 + "' is not greater than '" + value2 + "'.";
TestCaseStepActionControlExecution tcsace = new TestCaseStepActionControlExecution();
tcsace.setControl("verifyNumericGreater");
tcsace.setValue1(value1);
tcsace.setValue2(value2);
tcsace.setFatal("Y");
TestCaseStepExecution tcse = new TestCaseStepExecution();
tcse.settCExecution(tCExecution);
TestCaseStepActionExecution tcsae = new TestCaseStepActionExecution();
tcsae.setTestCaseStepExecution(tcse);
tcsace.setTestCaseStepActionExecution(tcsae);
this.controlService.doControl(tcsace);
Assert.assertEquals("KO", tcsace.getReturnCode());
Assert.assertEquals("Y", tcsace.getFatal());
}
Aggregations