Example #1
0
        public async Task ReturnsArrayOfNWSStations()
        {
            var content = fac.Get("stations.json");

            FactoryMock.Setup(f => f.CreateClient(It.IsAny <string>()))
            .Returns(GetHttpClient(content));

            var stuff = await repository.GetOfficeStations("ILN", "88", "76");

            stuff.Should().NotBeNull()
            .And.HaveCount(c => c > 0);
        }
Example #2
0
        public async Task ReturnsNWSOffice()
        {
            var content = fac.Get("weatherdata.json");

            FactoryMock.Setup(f => f.CreateClient(It.IsAny <string>()))
            .Returns(GetHttpClient(content));

            var stuff = await repository.GetNWSOfficeAsync("41.782", "-80.858");

            stuff.Should().NotBeNull().And
            .BeOfType(typeof(NWSLocation));
        }