public async Task GetEntriesAsync_ValidSettings_ReturnsEntriesFromConfig()
        {
            var entries = new List <CommandEntry> {
                new CommandEntry()
                {
                    Name = "1"
                }, new CommandEntry()
                {
                    Name = "2"
                }
            };

            settings.Entries.Returns(entries);
            Assert.That(await controller.GetEntriesAsync().ConfigureAwait(false), Is.EquivalentTo(entries));
        }
Пример #2
0
        public async Task GetEntriesAsync_ValidProxyController_ReturnsEntriesFromController()
        {
            var entries = new List <CommandEntry> {
                new CommandEntry()
                {
                    Name = "1"
                }, new CommandEntry()
                {
                    Name = "2"
                }
            };

            proxyController.GetEntriesAsync().Returns(entries);
            IBackendAsync backend = new LocalBackend(null, proxyController, null);

            Assert.That(await backend.GetEntriesAsync().ConfigureAwait(false), Is.SameAs(entries));
        }
Пример #3
0
 public Task <IEnumerable <CommandEntry> > GetEntriesAsync()
 {
     return(proxyController.GetEntriesAsync());
 }