Пример #1
0
        public async Task Given_A_Deck_If_User_Is_Not_Owner_Should_Not_Invoke_DeleteDeckByIdAndUserId()
        {
            // Arrange
            var deck = new DeckInputModel
            {
                MainDeck = new List <CardInputModel>()
            };

            var command = new DeleteDeckCommand {
                Deck = deck
            };

            _userService.IsUserDeckOwner(Arg.Any <string>(), Arg.Any <long>()).Returns(false);

            // Act
            await _sut.Handle(command, CancellationToken.None);

            // Assert
            await _deckService.DidNotReceive().DeleteDeckByIdAndUserId(Arg.Any <string>(), Arg.Any <long>());
        }