示例#1
0
    public void SetMessageLogAsync()
    {
        var mock = new Mock <IGuildData>(MockBehavior.Strict);

        mock.Setup(x => x.SetMessageLogAsync(1, false)).Returns(Task.CompletedTask);
        var guildService = new GuildService(mock.Object);

        guildService.SetMessageLogAsync(1, false);

        mock.Verify(x => x.SetMessageLogAsync(1, false), Times.Exactly(1));
    }