public void LoadContainer_ShouldReturnFalseNotFit() { // Arrange Ship ship = new Ship(3, 2); List <IContainer> containers = Harbor.CreateShipment(5, 0, 10); // Act bool result = ship.LoadContainers(containers); // Assert Assert.False(result); }
public void CanHandleWeight_ShouldWork() { // Arrange Ship ship = new Ship(3, 2); List <IContainer> containers = Harbor.CreateShipment(4, 8, 18); // Act ship.LoadContainers(containers); (int, int)halfWeights = ship.GetFrontAndBackWeight(); // Assert Assert.Equal(450, halfWeights.Item1); }
public void LoadContainers_ShouldWorkSmall() { // Arrange int expected = 5; Ship ship = new Ship(2, 2); List <IContainer> containers = Harbor.CreateShipment(0, 0, 20); // Act ship.LoadContainers(containers); int result = ship.Rows[1].Stacks[1].Containers.Count; // Assert Assert.Equal(expected, result); }