public void ShouldRetrieveRequirements() { // Arrange String teamName = "AnyName"; String requirementDetail = "Round 0\nWell done!"; Requirements requirements = new Requirements(); ICheckoutClient client = A.Fake <ICheckoutClient>(x => x.Strict()); A.CallTo(() => client.get <RequirementResponse>(String.Format("/Checkout/Requirements/{0}", teamName))) .ReturnsLazily((String path) => Tuple.Create(System.Net.HttpStatusCode.Created, new RequirementResponse { requirements = requirementDetail })); // Act bool retrieved = requirements.retrieve(client, teamName); // Assert Assert.IsTrue(retrieved); Assert.AreEqual(requirementDetail, requirements.Detail); }
public bool retrieve(ICheckoutClient client, String teamName) { response = client.get<RequirementResponse>(String.Format("/Checkout/Requirements/{0}", teamName)); return (response.Item1 == System.Net.HttpStatusCode.Created); }
public bool retrieve(ICheckoutClient client, String teamName) { response = client.get <RequirementResponse>(String.Format("/Checkout/Requirements/{0}", teamName)); return(response.Item1 == System.Net.HttpStatusCode.Created); }