public void Hide_NullListThrowsException() { //Arrange IfNoSubItemsInInstantPackageHide testObject = new IfNoSubItemsInInstantPackageHide(new TestCache()); List <IItemKey> nullSubItems = null; // Act & Assert Assert.Throws <ArgumentNullException>(() => testObject.Hide(nullSubItems)); }
public void Hide_NoSubItemsEmptyPackageReturnsTrue() { //Arrange IfNoSubItemsInInstantPackageHide testObject = new IfNoSubItemsInInstantPackageHide(new TestCache()); List <IItemKey> subItems = new List <IItemKey>() { }; //Act bool hidden = testObject.Hide(subItems); //Assert Assert.IsTrue(hidden); }
public void Hide_NoSubItemsPopulatedPackageReturnsTrue() { //Arrange IfNoSubItemsInInstantPackageHide testObject = new IfNoSubItemsInInstantPackageHide(new TestCache()); _testInstantPackageManager.AddItem(_testItemKey5); List <IItemKey> subItems = new List <IItemKey>() { }; //Act bool hidden = testObject.Hide(subItems); //Assert Assert.IsTrue(hidden); }
public void Hide_PopulatedPackageDoesNotContainAnySubItemReturnsTrue() { //Arrange IfNoSubItemsInInstantPackageHide testObject = new IfNoSubItemsInInstantPackageHide(new TestCache()); List <IItemKey> subItems = new List <IItemKey>() { _testSubItemKey1, _testSubItemKey2, _testSubItemKey3, _testSubItemKey4 }; _testInstantPackageManager.AddItem(_testItemKey5); //Act bool hidden = testObject.Hide(subItems); //Assert Assert.IsTrue(hidden); }
public void Hide_ContainsSomeSubItemReturnsFalse() { //Arrange IfNoSubItemsInInstantPackageHide testObject = new IfNoSubItemsInInstantPackageHide(new TestCache()); List <IItemKey> subItems = new List <IItemKey>() { _testSubItemKey1, _testSubItemKey2, _testSubItemKey3, _testSubItemKey4 }; _testInstantPackageManager.AddItem(_testSubItemKey1); _testInstantPackageManager.AddItem(_testSubItemKey2); _testInstantPackageManager.AddItem(_testItemKey5); //Act bool hidden = testObject.Hide(subItems); //Assert Assert.IsFalse(hidden); }