public async Task EnvironmentListUncachedWhenRemoved() { // want to make sure this works no matter where the cache is first loaded for (int i = 0; i < 3; ++i) { var inner = new TestEnvironmentCoordinator(); var outer = new CachingConfigRepository <RenderingEnvironment>(inner, NewCache()); if (i == 0) { await outer.List(); } var env = NewEnv(); await outer.Update(env, env.Name, null); if (i == 1) { await outer.List(); } await outer.Remove(env.Name); Assert.Empty(await outer.List()); } }
public async Task EnvironmentUncachedWhenRemoved() { var inner = new TestEnvironmentCoordinator(); var outer = new CachingConfigRepository <RenderingEnvironment>(inner, NewCache()); var env = NewEnv(); await outer.Update(env, env.Name, null); await outer.Remove(env.Name); Assert.Null(await outer.Get(env.Name)); }