public void When_I_Call_GetBuildStatus_And_There_Is_Data_The_Status_Will_Be_CorectlyRead() { var testDocument = new XmlDocument(); string xmlStatus = "SUCCESS"; testDocument.LoadXml(string.Format("<body status='{0}'></body>", xmlStatus)); _teamCityService.LoadXmlFromUrl(Arg.Any <string>()).ReturnsForAnyArgs(testDocument); //Act var status = _teamCityService.GetBuildStatus("123"); //Assert Assert.AreEqual(xmlStatus, status); }
public void Arrange() { _teamCityService = Substitute.For <TeamCityService>(); _teamCityService.LoadXmlFromUrl(Arg.Any <string>()).ReturnsForAnyArgs(new XmlDocument()); }