Example #1
0
        public void Hide_NullListThrowsException()
        {
            //Arrange
            IfAllSubItemsInInstantPackageHide testObject = new IfAllSubItemsInInstantPackageHide(new TestCache());
            List <IItemKey> nullSubItems = null;

            // Act & Assert
            Assert.Throws <ArgumentNullException>(() => testObject.Hide(nullSubItems));
        }
Example #2
0
        public void Hide_NoSubItemsEmptyPackageReturnsTrue()
        {
            //Arrange
            IfAllSubItemsInInstantPackageHide testObject = new IfAllSubItemsInInstantPackageHide(new TestCache());
            List <IItemKey> subItems = new List <IItemKey>()
            {
            };

            //Act
            bool hidden = testObject.Hide(subItems);

            //Assert
            Assert.IsTrue(hidden);
        }
Example #3
0
        public void Hide_EmptyPackageReturnsFalse()
        {
            //Arrange
            IfAllSubItemsInInstantPackageHide testObject = new IfAllSubItemsInInstantPackageHide(new TestCache());
            List <IItemKey> subItems = new List <IItemKey>()
            {
                _testSubItemKey1, _testSubItemKey2, _testSubItemKey3, _testSubItemKey4
            };

            //Act
            bool hidden = testObject.Hide(subItems);

            //Assert
            Assert.IsFalse(hidden);
        }
Example #4
0
        public void Hide_ContainsNoItemsReturnsFalse()
        {
            //Arrange
            IfAllSubItemsInInstantPackageHide testObject = new IfAllSubItemsInInstantPackageHide(new TestCache());
            List <IItemKey> subItems = new List <IItemKey>()
            {
                _testSubItemKey1, _testSubItemKey2, _testSubItemKey3, _testSubItemKey4
            };

            _testInstantPackageManager.AddItem(_testItemKey5);

            //Act
            bool hidden = testObject.Hide(subItems);

            //Assert
            Assert.IsFalse(hidden);
        }