Exemplo n.º 1
0
        public void CalculateTimeBetweenButtonPressesTest()
        {
            StormData stormData  = new StormData();
            double    timeResult = stormData.CalculateTimeBetweenButtonPresses();

            Assert.Fail();
        }
Exemplo n.º 2
0
        public void TimeFactoringPingTest()
        {
            StormData stormData = new StormData();
            DateTime  shouldFailAndReturn0Date = stormData.TimeFactoringPing(new DateTime(2017, 05, 18, 12, 30, 20), "www.failtoping555.org");
            var       shouldPassWithAnyResult  = stormData.TimeFactoringPing(new DateTime(2017, 05, 18, 12, 30, 20), "www.google.co.uk");

            Assert.Equals(shouldFailAndReturn0Date(), new DateTime(0000, 0, 0));
        }
Exemplo n.º 3
0
        public void ConvertMeterstoMilesTest()
        {
            StormData stormData      = new StormData();
            double    result         = stormData.ConvertMeterstoMilesTest(10);
            double    resultShouldBe = 0.00621371;

            Assert.Equals(result, resultShouldBe);
        }
Exemplo n.º 4
0
 private static bool StormQualifies(StormData data)
 {
     if (data.DataPoints.Count < 3)
     {
         return(false);
     }
     if (data.DataPoints[0].Year < 1900)
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 5
0
 public Tornado()
 {
     name = MainTools.Case();
 }