public void ItShouldBePossibleToRemoveGroupNoGroupShouldDoNothing() { var target = new NodeCache(_runner,TimeSpan.FromSeconds(10)); target.RemoveGroup("notExisting"); target.Execute().Count(); Assert.AreEqual(1, target.Groups.Count); Assert.IsFalse(target.Groups.ContainsKey("notExisting")); }
public void ItShouldBePossibleToRemoveGroup() { var target = new NodeCache(_runner,TimeSpan.FromSeconds(10)); target.AddGroup(new CacheGroupDefinition { Id = "test", Capped = 1000, ExpireAfter = TimeSpan.FromMilliseconds(500), RollingExpiration = true }); target.Execute().Count(); Assert.AreEqual(2, target.Groups.Count); target.RemoveGroup("test"); target.Execute().Count(); Assert.AreEqual(1, target.Groups.Count); Assert.IsFalse(target.Groups.ContainsKey("test")); }