Пример #1
0
        public void FindTrailSeason_DefaultData_ExpectedBehaviour()
        {
            var obj = new Trail();

            var result = TrailsManager.FindTrailSeason(obj);

            Assert.IsNotNull(result);
        }
Пример #2
0
        public void FindTrailSeason_Case8_ExpectedBehaviour()
        {
            var obj = new Trail();

            obj.month = 12;
            obj.day   = 20;

            var result = TrailsManager.FindTrailSeason(obj);

            Assert.AreEqual(result, "Jesień");
        }
Пример #3
0
        public void FindTrailSeason_Case5_ExpectedBehaviour()
        {
            var obj = new Trail();

            obj.month = 9;
            obj.day   = 22;

            var result = TrailsManager.FindTrailSeason(obj);

            Assert.AreEqual(result, "Lato");
        }
Пример #4
0
        public void FindTrailSeason_Case3_ExpectedBehaviour()
        {
            var obj = new Trail();

            obj.month = 6;
            obj.day   = 21;

            var result = TrailsManager.FindTrailSeason(obj);

            Assert.AreEqual(result, "Wiosna");
        }
Пример #5
0
 //sets labels text to selected trail data
 private void SetLabelsToTrailData(int index)
 {
     trailName.Text          = TrailsManager.trailsList[index].trailName;
     trailDescription.Text   = TrailsManager.trailsList[index].trailDescription;
     trailAvgSpeed.Text      = TrailsManager.trailsList[index].TrailAvgSpeed().ToString() + " km/h";
     trailDistance.Text      = TrailsManager.trailsList[index].distance.ToString() + " km";
     trailTime.Text          = $"{TrailsManager.trailsList[index].hours}h {TrailsManager.trailsList[index].minutes}min";
     trailElevationGain.Text = TrailsManager.trailsList[index].elevationGain.ToString() + " m n.p.m";
     trailDate.Text          = $"{TrailsManager.trailsList[index].day}.{TrailsManager.trailsList[index].month}.{TrailsManager.trailsList[index].year}";
     trailSeason.Text        = TrailsManager.FindTrailSeason(TrailsManager.trailsList[index]);
 }