Beispiel #1
0
        public async Task ErrorRate_Put_ReturnsValue_Test()
        {
            ErrorRateData body = new ErrorRateData();

            body.Time_Stamp = DateTime.Now;
            var expected = await Err.PutOne(1, body);

            await Db.Connection.CloseAsync();

            Assert.IsNotNull(expected);
        }
Beispiel #2
0
        public async Task ErrorRate_Put_ReturnsNotFoundResultOnNullIndex_Test()
        {
            ErrorRateData body = new ErrorRateData();

            body.Time_Stamp = DateTime.Now;
            var actual = await Err.PutOne(999, body);

            await Db.Connection.CloseAsync();

            Assert.IsInstanceOf <NotFoundResult>(actual);
        }
Beispiel #3
0
        public async Task ErrorRate_Put_ReturnsOkObjectResultOnExistingIndex_Test()
        {
            ErrorRateData body = new ErrorRateData();

            body.Time_Stamp = DateTime.Now;
            var actual = await Err.PutOne(2, body);

            await Db.Connection.CloseAsync();

            Assert.IsInstanceOf <OkObjectResult>(actual);
        }