public void ThrowExWhenWebServiceFails() { string filename = "http://localhost/unexisting/no.asmx"; WebServiceCatalogModuleInfoStore store = mockContainer.Services.AddNew <WebServiceCatalogModuleInfoStore, IModuleInfoStore>(); store.CatalogUrl = filename; store.Roles = new string[] { "null" }; string results = store.GetModuleListXml(); Assert.IsNull(results); }
public void RequestCatalogContentsFromWebServiceAsString() { string contents = "<SolutionProfile xmlns=\"http://schemas.microsoft.com/pag/cab-profile/2.0\">" + "</SolutionProfile>"; WebServiceCatalogModuleInfoStore store = mockContainer.Services.AddNew <WebServiceCatalogModuleInfoStore, IModuleInfoStore>(); store.Roles = new string[] { "tester" }; string results = store.GetModuleListXml(); Assert.AreEqual(contents, results); }