コード例 #1
0
        public async Task HandleNotificationAsync_MessageReceivedNotification_MessageAuthorIsNotGuildUser_DoesNotDeleteMessage()
        {
            (var autoMocker, var uut) = BuildTestContext();

            var notification = new MessageReceivedNotification(
                message: BuildTestMessage(autoMocker, DefaultInviteLink));

            autoMocker.GetMock <ISocketMessage>()
            .Setup(x => x.Author)
            .Returns(autoMocker.Get <IUser>());

            await uut.HandleNotificationAsync(notification);

            autoMocker.MessageShouldNotHaveBeenDeleted();
        }