use of com.thoughtworks.go.domain.JobIdentifier in project gocd by gocd.
the class TestInformationTest method equalsFalseWhenStatusSameNameDifferentAndJobIdentifiersHaveSameNames.
@Test
public void equalsFalseWhenStatusSameNameDifferentAndJobIdentifiersHaveSameNames() {
TestInformation info1 = new TestInformation("test", TestStatus.Error);
info1.addJob(new JobIdentifier(null, 1, null, null, null, "job1"));
info1.addJob(new JobIdentifier(null, 2, null, null, null, "job"));
TestInformation info2 = new TestInformation("anotherTest", TestStatus.Error);
info2.addJob(new JobIdentifier(null, 3, null, null, null, "job1"));
info2.addJob(new JobIdentifier(null, 4, null, null, null, "job"));
assertThat(info1, not(info2));
assertThat(info2, not(info1));
}
use of com.thoughtworks.go.domain.JobIdentifier in project gocd by gocd.
the class TestInformationTest method equalsFalseWhenStatusSameNameSameAndJobIdentifiersAreASubset.
@Test
public void equalsFalseWhenStatusSameNameSameAndJobIdentifiersAreASubset() {
TestInformation info1 = new TestInformation("test", TestStatus.Error);
info1.addJob(new JobIdentifier(null, 1, null, null, null, "job1"));
info1.addJob(new JobIdentifier(null, 2, null, null, null, "job"));
TestInformation info2 = new TestInformation("test", TestStatus.Error);
info2.addJob(new JobIdentifier(null, 3, null, null, null, "job1"));
info2.addJob(new JobIdentifier(null, 4, null, null, null, "job"));
info2.addJob(new JobIdentifier(null, 4, null, null, null, "job33"));
assertThat(info1, not(info2));
}
use of com.thoughtworks.go.domain.JobIdentifier in project gocd by gocd.
the class TestInformationTest method equalsFalseWhenStatusDifferentNameSameAndJobIdentifiersHaveSameNames.
@Test
public void equalsFalseWhenStatusDifferentNameSameAndJobIdentifiersHaveSameNames() {
TestInformation info1 = new TestInformation("test", TestStatus.Error);
info1.addJob(new JobIdentifier(null, 1, null, null, null, "job1"));
info1.addJob(new JobIdentifier(null, 2, null, null, null, "job"));
TestInformation info2 = new TestInformation("test", TestStatus.Failure);
info2.addJob(new JobIdentifier(null, 3, null, null, null, "job1"));
info2.addJob(new JobIdentifier(null, 4, null, null, null, "job"));
assertThat(info1, not(info2));
}
use of com.thoughtworks.go.domain.JobIdentifier in project gocd by gocd.
the class TestSuiteTest method shouldReturnTestOrderedAlphabetically.
@Test
public void shouldReturnTestOrderedAlphabetically() throws Exception {
testSuite.addTest("testB", TestStatus.Error, new JobIdentifier("", -1, "", "", "", "job-1"));
testSuite.addTest("testA", TestStatus.Error, new JobIdentifier("", -1, "", "", "", "job-1"));
testSuite.addTest("testC", TestStatus.Failure, new JobIdentifier("", -1, "", "", "", "job-1"));
List<TestInformation> tests = testSuite.tests();
assertThat(tests.get(0).getName(), is("testA"));
assertThat(tests.get(1).getName(), is("testB"));
assertThat(tests.get(2).getName(), is("testC"));
}
use of com.thoughtworks.go.domain.JobIdentifier in project gocd by gocd.
the class TestSuiteTest method shouldNotRemoveTestsThatHaveSameNameAndDiffernetContext.
@Test
public void shouldNotRemoveTestsThatHaveSameNameAndDiffernetContext() {
testSuite.addTest("testB", TestStatus.Error, new JobIdentifier("", -1, "", "", "", "job-1"));
testSuite.addTest("testA", TestStatus.Error, new JobIdentifier("", -1, "", "", "", "job-1"));
TestSuite testSuite1 = new TestSuite("another-suite");
testSuite1.addTest("testA", TestStatus.Error, new JobIdentifier("", 23, "", "", "", "job-2"));
testSuite.removeDuplicateTestEntries(testSuite1);
List<TestInformation> list = testSuite.tests();
assertThat(list.size(), is(2));
}
Aggregations