public void CalcWeightTest() { // Arrange B52 b52 = new B52(); b52.Fuel = 100000; b52.Weight = 200000; int expected = 300000; // Act int actual = b52.CalcWeight(); // Assert Assert.AreEqual(expected, actual); }
public void AddWCMDWeaponTest() { // Arrange B52 b52 = new B52(); Weapon WCMDWeapon = new Weapon(WeaponType.WCMD); int expected = 217648; // Act b52.AddWeapon(Storage.Left, WCMDWeapon); b52.AddWeapon(Storage.Right, WCMDWeapon); int actual = b52.CalcWeight(); // Assert Assert.AreEqual(expected, actual); Assert.ThrowsException <LoadErrorException>(() => b52.AddWeapon(Storage.Left, WCMDWeapon)); Assert.ThrowsException <LoadErrorException>(() => b52.AddWeapon(Storage.Right, WCMDWeapon)); Assert.ThrowsException <LoadErrorException>(() => b52.AddWeapon(Storage.Bay, WCMDWeapon)); }