public void DeleteAccount_Test() { var accessor = new InMemoryPartitionedUserTokenCacheAccessor(new NullLogger(), null); var acc1 = TokenCacheHelper.CreateAccountItem("tenant1", "homeAccountId"); var acc2 = TokenCacheHelper.CreateAccountItem("tenant1", "homeAccountId2"); var acc3 = TokenCacheHelper.CreateAccountItem("tenant2", "homeAccountId"); // Assert: Delete on empty collection doesn't throw accessor.DeleteAccount(acc1); accessor.SaveAccount(acc1); accessor.SaveAccount(acc2); accessor.SaveAccount(acc3); Assert.AreEqual(3, accessor.GetAllAccounts().Count); // Assert: Delete on existing item accessor.DeleteAccount(acc1); Assert.AreEqual(2, accessor.GetAllAccounts().Count); }