예제 #1
0
        public void Should_ThrowArgumentNullException_WhenAddNullParameter_AndCollectionIsEmpty()
        {
            var head = new Head();

            Assert.Throws <ArgumentNullException>(() => head.Add(null));
            Assert.IsFalse(head.Any());
        }
예제 #2
0
        public void Should_AddCorrectComponent_HeadIsNotEmpty()
        {
            var head = new Head();

            Assert.DoesNotThrow(() => head.Add(new Component("asd", ComponentType.DRY, false)));

            Assert.IsTrue(head.Any());
        }
예제 #3
0
        public void Should_PumpingComponent_CheckHeadIsNotEmpty()
        {
            var head = new Head();
            var pump = new Pump(head);

            pump.Pumping(new Component("asd", ComponentType.DRY, false));
            Assert.IsTrue(head.Any());
        }
예제 #4
0
        public void Should_PumpingNullComponent_CheckHeadIsEmpty()
        {
            var head = new Head();
            var pump = new Pump(head);

            Assert.Throws <ArgumentNullException>(() => pump.Pumping(null));
            Assert.IsFalse(head.Any());
        }
예제 #5
0
 public bool ShouldSerializeHead() => Head.Any();
예제 #6
0
        public void Should_CreateObject_AndComponentsIsEmpty()
        {
            var head = new Head();

            Assert.IsFalse(head.Any());
        }