Exemplo n.º 1
0
 public void ItContainsListOfDestinations()
 {
     using (var stream = RessourceHelper.GetRessource("WalkupScanDestinations.xml"))
     {
         var walkupScanDestinations = WalkupScanDestinations.CreateFromStream(stream);
         Assert.Equal(1, walkupScanDestinations.WalkupScanDestination.Count);
     }
 }
Exemplo n.º 2
0
 public void SampleContainsAKnownDestinationName()
 {
     using (var stream = RessourceHelper.GetRessource("WalkupScanDestinations.xml"))
     {
         var walkupScanDestinations = WalkupScanDestinations.CreateFromStream(stream);
         Assert.True(walkupScanDestinations.WalkupScanDestination.Any(x => x.Name == "DESKTOP-JI67N1P"));
     }
 }
Exemplo n.º 3
0
        public async Task <WalkupScanDestinations> GetWalkupScanDestinations()
        {
            var httpClient = new HttpClient();
            var addr       = $"{_baseUrl}/WalkupScan/WalkupScanDestinations";
            var response   = await httpClient.GetAsync(addr);

            using (var inStream = await response.Content.ReadAsStreamAsync())
            {
                return(WalkupScanDestinations.CreateFromStream(inStream));
            }
        }