public void EmptyStringThrows() { WebServiceCatalogModuleInfoStore store = mockContainer.Services.AddNew <WebServiceCatalogModuleInfoStore, IModuleInfoStore>(); store.CatalogUrl = ""; }
public void NullFileThrows() { WebServiceCatalogModuleInfoStore store = mockContainer.Services.AddNew <WebServiceCatalogModuleInfoStore, IModuleInfoStore>(); store.CatalogUrl = null; }
private void InitializeWebServiceCatalogModuleInfoStore() { IRoleService roleService = RootWorkItem.Services.Get <IRoleService>(); WebServiceCatalogModuleInfoStore store = RootWorkItem.Services.Get <IModuleInfoStore>() as WebServiceCatalogModuleInfoStore; store.Roles = roleService.GetRolesForUser(Thread.CurrentPrincipal.Identity.Name); }
public void DefaultCatalogUrlIsCorrect() { WebServiceCatalogModuleInfoStore store = mockContainer.Services.AddNew <WebServiceCatalogModuleInfoStore, IModuleInfoStore>(); Assert.AreEqual("http://localhost:54092/profilecatalogservices/profilecatalog.asmx", store.CatalogUrl.ToLowerInvariant()); }
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); }