stefaca
12 years agoNew Contributor
JUnit & assertEquals status
hi there,
I have a small problem with Equals status in assert. I'm trying to compare expected status (FINISHED is expected status) with actual one (getStatus() method). if so test will be OK. but whats the problem? in code when I type Status.FINISHED field FINISHED throws message that "FINISHED cannot be resolved or is not a field".
here is a code:
I have a small problem with Equals status in assert. I'm trying to compare expected status (FINISHED is expected status) with actual one (getStatus() method). if so test will be OK. but whats the problem? in code when I type Status.FINISHED field FINISHED throws message that "FINISHED cannot be resolved or is not a field".
here is a code:
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import com.eviware.soapui.config.WorkspaceProjectConfig.Status;
import com.eviware.soapui.impl.wsdl.WsdlProject;
import com.eviware.soapui.model.support.PropertiesMap;
import com.eviware.soapui.model.testsuite.TestCase;
import com.eviware.soapui.model.testsuite.TestRunner;
import com.eviware.soapui.model.testsuite.TestSuite;
public class IntegraconiServisi {
@Test
public void testCaseIstorijaPromenaPDVPerioda() throws Exception {
WsdlProject wsdlProject = new WsdlProject("/home/stefaca/workspace/JUnitTesting/xml/IntegracioniServisi-soapui-project_V2.xml");
TestSuite testSuite = wsdlProject.getTestSuiteByName("IntegracioniServisiTestSuite");
TestCase testCase = testSuite.getTestCaseByName("istorijaPromenaPDVPerioda TestCase");
TestRunner runner = testCase.run(new PropertiesMap(), false);
assertEquals(Status.FINISHED, runner.getStatus());
}