Exemple #1
0
        public async void Digit9CanNotRoadWednesdaysMorning()
        {
            PicoYPlacaInput picoYPlacaInput = new PicoYPlacaInput()
            {
                LicensePlate = "ABC-129",
                Date         = "04/09/2020",
                Time         = "08:00"
            };
            var request  = TestFactory.CreateHttpRequest("Body", JsonSerializer.Serialize(picoYPlacaInput));
            var response = (OkObjectResult)await PicoYPlacaPredictor.Run(request, logger);

            Assert.Equal("{\"Code\":3,\"Message\":\"Your car can not road at all\"}", response.Value);
        }
Exemple #2
0
        public async void Digit1CanRoadTuesday()
        {
            PicoYPlacaInput picoYPlacaInput = new PicoYPlacaInput()
            {
                LicensePlate = "ABC-121",
                Date         = "02/09/2020",
                Time         = "12:00"
            };
            var request  = TestFactory.CreateHttpRequest("Body", JsonSerializer.Serialize(picoYPlacaInput));
            var response = (OkObjectResult)await PicoYPlacaPredictor.Run(request, logger);

            Assert.Equal("{\"Code\":1,\"Message\":\"Your car can road all day\"}", response.Value);
        }
Exemple #3
0
        public async void Digit1CanRoadMondaysNoon()
        {
            PicoYPlacaInput picoYPlacaInput = new PicoYPlacaInput()
            {
                LicensePlate = "ABC-121",
                Date         = "31/08/2020",
                Time         = "12:00"
            };
            var request  = TestFactory.CreateHttpRequest("Body", JsonSerializer.Serialize(picoYPlacaInput));
            var response = (OkObjectResult)await PicoYPlacaPredictor.Run(request, logger);

            Assert.Equal("{\"Code\":2,\"Message\":\"Your car can not road this day but it can road on this hour\"}", response.Value);

            //{"Code":1,"Message":"Your car can road all day"}
        }