Beispiel #1
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());
        }
Beispiel #2
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());
        }
Beispiel #3
0
        public void Should_PumpingComponent_CheckInHeadInsertedComponentIsIn()
        {
            var head  = new Head();
            var pump  = new Pump(head);
            var compo = new Component("asd", ComponentType.DRY, false);

            pump.Pumping(compo);

            Assert.IsTrue(head.Contains(compo));
            Assert.IsFalse(head.Contains(new Component("asdd", ComponentType.DRY, false)));
        }
Beispiel #4
0
        public void Should_PumpingComponent_WhenArgumentIsCorrect()
        {
            var pump = new Pump(new Head());

            Assert.DoesNotThrow(() => pump.Pumping(new Component("asd", ComponentType.DRY, false)));
        }
Beispiel #5
0
        public void Should_ThrowArgumentNullException_WhenPumpingNullComponent()
        {
            var pump = new Pump(new Head());

            Assert.Throws <ArgumentNullException>(() => pump.Pumping(null));
        }