public void TestMethod_ChangeDestination_Exception(bool flag, string rocketName, string destination) { //configure MOQ ConfigureMOQ_ChangeDestination(null); var cargoRocketWarehouse = new NextGenCargoRocketWarehouse(_cargoRocketInventory.Object); var actual = cargoRocketWarehouse.ChangeDestination(rocketName, destination); }
public void TestMethod_ChangeDestination(bool flag, string rocketName, string destination) { var expected = flag ? CargoRocketEntity(rocketName, destination) : null; //configure MOQ ConfigureMOQ_ChangeDestination(expected); var cargoRocketWarehouse = new NextGenCargoRocketWarehouse(_cargoRocketInventory.Object); var actual = cargoRocketWarehouse.ChangeDestination(rocketName, destination); if (flag) { expected.ToExpectedObject().ShouldEqual(actual); } else { Assert.AreEqual(expected, actual); } }