public void WeaponListTest() { List <AirWeapons> list = CraftWeaponsDatabase.ReturnWeaponList(); // ReturnCraftList string result = list[5].getName(); string target = "CALCM"; Assert.AreEqual(result, target, "they are not equall"); int result1 = list[4].getWeight(); int target1 = 16324; Assert.AreEqual(result1, target1, "result did not pass"); }
public void TotalWeaponLoadTest() { int B52 = 185000; //empty plane weight int LeftWingLoaded = 7988; //Gravity weight added to the Left Wing int RightWingLoaded = 30194; //ALCM weight added to the Right Wing int BayLoaded = 0; //Bay is left empty. int FuelAdded = 150000; //Add fuel to the plane. //expected plane weight when loaded int LoadedPlaneWeight = B52 + LeftWingLoaded + RightWingLoaded + FuelAdded + BayLoaded; //Return lists List <AirCraft> ListCraft = CraftWeaponsDatabase.ReturnCraftList(); List <AirWeapons> ListWeapon = CraftWeaponsDatabase.ReturnWeaponList(); int weighB52 = UserViewModel.ReturnTotalWeight(); Assert.AreEqual(LoadedPlaneWeight, weighB52, "result did not pass"); }