Ejemplo n.º 1
0
        public async Task Transaction_Put_ReturnsNotFoundResultOnNullIndex_Test()
        {
            TransactionData body = new TransactionData();

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

            await Db.Connection.CloseAsync();

            Assert.IsInstanceOf <NotFoundResult>(actual);
        }
Ejemplo n.º 2
0
        public async Task Transaction_Put_ReturnsOkObjectResultOnExistingIndex_Test()
        {
            TransactionData body = new TransactionData();

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

            await Db.Connection.CloseAsync();

            Assert.IsInstanceOf <OkObjectResult>(actual);
        }
Ejemplo n.º 3
0
        public async Task Transaction_Put_ReturnsValue_Test()
        {
            TransactionData body = new TransactionData();

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

            await Db.Connection.CloseAsync();

            Assert.IsNotNull(expected);
        }