コード例 #1
0
        public void ReturnEmpty_GivenOutsideSpeedLimits(decimal mph)
        {
            var parser = new TripRecordParser();

            var record = parser.ParseRecord($"Trip Sarah 08:45 09:45 {mph:N}");

            record.Should().Be(DrivingRecord.Empty);
        }
コード例 #2
0
        public void ReturnRecord_GivenValidInput(
            string input, string name, int minutes, decimal miles)
        {
            var parser = new TripRecordParser();

            var result = parser.ParseRecord(input);

            result.Name.Should().Be(name);
            result.Time.Should().Be(TimeSpan.FromMinutes(minutes));
            result.Miles.Should().Be(miles);
        }