public void RemovingItemNotInSiteDoesNotRemoveFromAdapter() { MockAdapter adapter = new MockAdapter(); UIExtensionSite site = new UIExtensionSite(adapter); object obj = new object(); site.Remove(obj); Assert.IsNull(adapter.RemovedElement); }
public void RemovingItemFromSiteRemovesItFromAdapter() { MockAdapter adapter = new MockAdapter(); UIExtensionSite site = new UIExtensionSite(adapter); object obj = new object(); site.Add(obj); site.Remove(obj); Assert.AreSame(obj, adapter.RemovedElement); Assert.AreEqual(0, site.Count); }