Beispiel #1
0
		public void TestDeletesRemoveBobsFromCache()
		{
			Usr usr = new Usr();
			usr.Update();
			UsrTableDef def = new UsrTableDef();
			Caching.Instances.Main.Set(new Caching.CacheKeys.BobCacheKey("Usr", usr.K, def.TableCacheKey), Guid.NewGuid().ToString());
			Assert.IsNotNull(Caching.Instances.Main.Get(new Caching.CacheKeys.BobCacheKey("Usr", usr.K, def.TableCacheKey)));
			usr.Delete();
			Assert.IsNull(Caching.Instances.Main.Get(new Caching.CacheKeys.BobCacheKey("Usr", usr.K, def.TableCacheKey)));
		}
Beispiel #2
0
		public void Delete_RemoveUsr1ThenLoadUsr1_BobNotFoundThrown()
		{
			SetupCacheForTesting();

			Usr usr = new Usr();
			usr.Update();
			int k = usr.K;
			usr.Delete();

			usr = new Usr(k);
		}