public void GetConfigAsync() { var mock = new Mock <IGuildData>(MockBehavior.Strict); mock.Setup(x => x.GetGuildConfigAsync(0)).Returns( Task.FromResult(new Sharp.Data.Config() { mod_Channel_Id = "123456789123456789", prefix = '-', message_log = false })); var guildService = new GuildService(mock.Object); var actual = guildService.GetConfigAsync(0); var expected = Task.FromResult(new Sharp.Service.Config { ModChannelId = 123456789123456789, Prefix = '-', MessageLog = false }); Assert.Equal(expected.Result, actual.Result); }