public void BadDataWarningMessageTest()
 {
     double collisionDistance = -25;
     InFlight inFlight = new InFlight();
     try {
         int actualWarning = inFlight.WarningMessage(collisionDistance);
     }
     catch (Exception e)
     {
         StringAssert.Contains(e.Message, "Bad data");
     }
     Assert.Fail("No exception was thrown.");
 }
Example #2
0
        public void TestMethod1(byte[] A0, byte[] A1)
        {
            double expected = 0;
            double actual;

            InFlight inFlight = new InFlight();
            //int t, is time in this case.
            for (int t = 0; t >= 30; t++)
            {
                actual = inFlight.WarningMessage(inFlight.CollisionCheck(A0, A1));
                Assert.AreEqual(expected, actual);
                AdvanceTime(A0);
                AdvanceTime(A1);
            }
        }
Example #3
0
        public void TestMethod1()
        {
            double expected = -1;
            double actual = 0;
            decimal lat1 = 1;
            decimal long1 = 1;
            decimal lat2 = 1;
            decimal long2 = 1;

            InFlight inFlight = new InFlight();
            //int t, is time in this case.
            for (int t = 0; t >= 30; t++)
            {
                actual = inFlight.WarningMessage(inFlight.CollisionCheck(lat1,  long1,  lat2,  long2));

              }
            Assert.AreEqual(expected, actual);
        }
        public void FirstWarningMessageTest()
        {
            int expectedWarning = 1;
            double collisionDistance = 200;

            InFlight inFlight = new InFlight();
            int actualWarning = inFlight.WarningMessage(collisionDistance);
            Assert.AreEqual(actualWarning, expectedWarning);
        }