Example #1
0
        public async Task Should_FetchesNames()
        {
            var client = new HttpClient(new MockHttpHandler())
            {
                BaseAddress = new("http://example.com")
            };
            var iComm = new IntranetCommunications(client);

            var names = (await iComm.FetchNames()).ToList();

            names.Count.Should().Equals(3);
            names.Should().Contain(new string[] { "foo", "bar", "baz" });
        }
    }
        public async Task FetchNamesFetchesNames()
        {
            var client = new HttpClient(new MockHttpHandler())
            {
                BaseAddress = new("http://example.com")
            };
            var iComm = new IntranetCommunications(client);

            var names = (await iComm.FetchNames()).ToList();

            Assert.Equal(3, names.Count);
            Assert.Contains("foo", names);
            Assert.Contains("bar", names);
            Assert.Contains("baz", names);
        }
    }