public void TestDisableProvidersWithNullProviderIdsList() { //setup var handler = CreateHandler(); var request = new DisableProvidersRequest(); //act var response = HandleRequest<DisableProvidersResponse>(handler, request); }
public void TestDisableProviders() { //setup var handler = CreateHandler(); var request = new DisableProvidersRequest() { ProviderIds = new int[] { 1, 2 } }; //act var response = HandleRequest<DisableProvidersResponse>(handler, request); //assert using (var context = _objectContextFactory.CreateObjectContext()) { context.ContextOptions.LazyLoadingEnabled = true; context.ContextOptions.ProxyCreationEnabled = true; var provider = context.CreateObjectSet<Provider>().Single(p => p.Id == 1); Assert.AreEqual(false, provider.IsEnabled); provider = context.CreateObjectSet<Provider>().Single(p => p.Id == 2); Assert.AreEqual(false, provider.IsEnabled); } }