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