Esempio n. 1
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"));
     }
 }
Esempio n. 2
0
 public static string GetRessourceAsString(string ressourceName)
 {
     using (var stream = RessourceHelper.GetRessource(ressourceName))
         using (var streamReader = new StreamReader(stream))
         {
             return(streamReader.ReadToEnd());
         }
 }
Esempio n. 3
0
 public void ItContainsListOfDestinations()
 {
     using (var stream = RessourceHelper.GetRessource("WalkupScanDestinations.xml"))
     {
         var walkupScanDestinations = WalkupScanDestinations.CreateFromStream(stream);
         Assert.Equal(1, walkupScanDestinations.WalkupScanDestination.Count);
     }
 }
Esempio n. 4
0
        public void SampleContainsAKnownDestinationName()
        {
            var expected = RessourceHelper.GetRessourceAsString("WalkupScanDestination.xml");

            var walkupScanDestinations = WalkupScanDestinationPost.CreateFrom("LAPTOP-BSHRTBV8", "LAPTOP-BSHRTBV8");

            var serializeToXml = walkupScanDestinations.SerializeToXml();

            Assert.Equal(expected, serializeToXml);
        }