Beispiel #1
0
        public async Task DeleteItemAsync()
        {
            var next = new Mock <IDeleteItemService <Uom> >(MockBehavior.Strict);

            next.Setup(n => n.DeleteItemAsync(1001)).Returns(Task.CompletedTask);
            var uut = new DeleteItemService <Uom>(next.Object);
            await uut.DeleteItemAsync(1001);
        }
Beispiel #2
0
        public void DeleteItemAsync_Id0()
        {
            var next = new Mock <IDeleteItemService <Uom> >(MockBehavior.Strict).Object;
            var uut  = new DeleteItemService <Uom>(next);

            Assert.ThrowsAsync <ArgumentOutOfRangeException>
            (
                async() => await uut.DeleteItemAsync(0)
            );
        }