private async Task <TestCaseValidation> GetTestCaseValidation(string url, string testCase) { HttpResponseMessage response = await _httpClient.GetAsync(url + testCase); string jobOrdering = await response.Content.ReadAsStringAsync(); VerifyJobOrder verifyJobOrder = new VerifyJobOrder(testCase, jobOrdering); bool passOrFail = verifyJobOrder.IsValid(); return(new TestCaseValidation(testCase, passOrFail)); }
public void WrongJobReturnedTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-", "b"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(false)); }
public void EmptyJobListTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("", ""); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(true)); }
public void CheckIfCircularDependencyNotCorrectTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-b|b-c|c-", "Can not resolve circular dependency"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(false)); }
public void CheckForJobDependingOnItselfNotCorrectTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-b|b-c|c-", "Can not resolve job depending on itself"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(false)); }
public void ExtraJobNotAddedToStringTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-|b-|c-|d-|e-|f-", "cbaed"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(false)); }
public void FiveJobsFourDependenciesWithIncorrectOrderTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-b|b-c|c-|d-b|e-d", "cbaed"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(false)); }
public void FiveJobsFourDependenciesTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-b|b-c|c-|d-b|e-d", "cbade"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(true)); }
public void ThreeJobsOneDependencyWrongOrderTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-b|b-|c-", "abc"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(false)); }
public void ThreeJobsOneDependencyDifferentOrderTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-b|b-|c-", "bac"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(true)); }
public void JobNotInListTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-|b-", "bac"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(false)); }
public void TwoJobsSwitchedOrderTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-|b-", "ba"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(true)); }
public void TwoJobsNoDependenciesTest() { VerifyJobOrder verifyJobOrder = new VerifyJobOrder("a-|b-", "ab"); Assert.That(verifyJobOrder.IsValid(), Is.EqualTo(true)); }