public void FindLastTrailIn_TestData_ExpectedBehaviour()
        {
            var obj1 = new Trail();

            obj1.day   = 3;
            obj1.month = 1;
            obj1.year  = 2020;

            var obj2 = new Trail();

            obj2.day   = 1;
            obj2.month = 1;
            obj2.year  = 2020;

            var obj3 = new Trail();

            obj3.day   = 1;
            obj3.month = 2;
            obj3.year  = 2021;
            var trailsList = new List <Trail>();

            trailsList.Add(obj1);
            trailsList.Add(obj2);
            trailsList.Add(obj3);

            var result = TrailsManager.FindLastTrailIn(trailsList).DaysPast2020();

            Assert.AreEqual(result, obj3.DaysPast2020());
        }
Esempio n. 2
0
        public void DaysPast2020_ValuesAreDefault_ExpectedBehaviour()
        {
            //arange
            var obj = new Trail();

            //act
            var result = obj.DaysPast2020();

            //assert
            Assert.IsNotNull(result);
        }
Esempio n. 3
0
        public void DaysPast2020_RegularYear1stMarch_ExpectedBehaviour()
        {
            //arrange
            var obj = new Trail();

            obj.year  = 2020;
            obj.month = 3;
            obj.day   = 1;

            //act
            var result = obj.DaysPast2020();

            //assert
            Assert.AreEqual(result, 61);
        }
Esempio n. 4
0
        public void DaysPast2020_RegularYear_ExpectedBehaviour()
        {
            //arrange
            var obj = new Trail();

            obj.year  = 2021;
            obj.month = 3;
            obj.day   = 24;

            //act
            var result = obj.DaysPast2020();

            //assert
            Assert.AreEqual(result, 366 + 83);
        }