Ejemplo n.º 1
0
        public void Check_minimum_weight_on_ship()
        {
            try
            {
                for (int i = 0; i < 5; i++)
                {
                    decimal Weight   = 30000;
                    bool    Standard = true;
                    bool    Valuable = false;
                    bool    Cooled   = false;

                    TestLogic.AddContainer(Weight, Standard, Valuable, Cooled);
                }
                TestLogic.StartAlgorithm();
            }
            catch (ExceptionHandler e)
            {
                string expectedString = String.Format("The total docked containers weight do not require the minimum ship weight of {0}! other wise the ship will capsize!", TestLogic.ship.MinWeight);
                Assert.AreEqual(expectedString, e.Message);
            }
        }
Ejemplo n.º 2
0
 private void btnStart_Click(object sender, EventArgs e)
 {
     try
     {
         logicServices.StartAlgorithm();
         SetSelectionList(logicServices.ship);
         lbUpdateShipInfo();
     }
     catch (ExceptionHandler exception)
     {
         rtbProgramLog.Clear();
         rtbProgramLog.Text = exception.Message;
     }
 }