public ListDirectoryTest() { var serversMock = new Mock <IDiscordServers>(); serversMock .Setup(s => s.GetChannelNamesFromServer(TestServerId)) .Returns(new[] { "ChannelA", "ChannelB", "ChannelC" }); serversMock .Setup(s => s.GetServerNameById(TestServerId)) .Returns(TestServerName); _ls = new ListDirectoryProvider(serversMock.Object); }
public ListDirectoryTest() { var serversMock = new Mock <IDiscordGuilds>(); serversMock .Setup(s => s.FromAsync(It.Is <MiunieUser>(u => u.GuildId == TestServerId))) .Returns(Task.FromResult(new MiunieGuild { ChannelNames = new[] { "ChannelA", "ChannelB", "ChannelC" }, Id = TestServerId, Name = TestServerName })); _ls = new ListDirectoryProvider(serversMock.Object); }
public DirectoryService(IDiscordMessages messages, IListDirectoryProvider directoryProvider) { _directoryProvider = directoryProvider; _messages = messages; }