Пример #1
0
        public void AddNumberAndTime_CalculatePlaceAndLaps_Pass()
        {
            CreateSut();
            DateTime start = new System.DateTime(2019, 1, 1, 1, 1, 1);

            sut.AddNumberAndTime("1", start.AddSeconds(100), "rfid");

            Assert.Single(sut.GetMarks());
            AssertResult("1", 1, 1);

            sut.AddNumberAndTime("2", start.AddSeconds(110), "rfid");
            AssertResult("2", 2, 1);
            sut.AddNumberAndTime("1", start.AddSeconds(220), "rfid");
            AssertResult("1", 1, 2);
            sut.AddNumberAndTime("2", start.AddSeconds(230), "rfid");
            AssertResult("2", 2, 2);
            sut.AddNumberAndTime("2", start.AddSeconds(330), "rfid");
            AssertResult("2", 1, 3);
            sut.AddNumberAndTime("1", start.AddSeconds(340), "rfid");
            AssertResult("1", 2, 3);
            sut.AddNumberAndTime("2", start.AddSeconds(430), "rfid");
            AssertResult("2", 1, 4);
            sut.AddNumberAndTime("2", start.AddSeconds(530), "rfid");
            AssertResult("2", 1, 5);
            sut.AddNumberAndTime("1", start.AddSeconds(540), "rfid");
            AssertResult("1", 2, 4);
        }