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()); }
public void Should_PumpingNullComponent_CheckHeadIsEmpty() { var head = new Head(); var pump = new Pump(head); Assert.Throws <ArgumentNullException>(() => pump.Pumping(null)); Assert.IsFalse(head.Any()); }
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))); }
public void Should_PumpingComponent_WhenArgumentIsCorrect() { var pump = new Pump(new Head()); Assert.DoesNotThrow(() => pump.Pumping(new Component("asd", ComponentType.DRY, false))); }
public void Should_ThrowArgumentNullException_WhenPumpingNullComponent() { var pump = new Pump(new Head()); Assert.Throws <ArgumentNullException>(() => pump.Pumping(null)); }