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)); } }
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()); } }