Beispiel #1
0
 public void With_InValid_Stream(string data)
 {
     using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(data)))
     {
         var strategy = new NuGetParser();
         Assert.Throws <ParserException>(() => strategy.Parse(stream));
     }
 }
Beispiel #2
0
 public void With_Valid_Stream(string data)
 {
     using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(data)))
     {
         var strategy = new NuGetParser();
         var result   = strategy.Parse(stream);
         Assert.True(result.Any());
     }
 }