public void Setup() { Stream stream = new MemoryStream(Properties.Resources.TestLVT); StreamReader streamReader = new StreamReader(stream); JsonParser Parser = new JsonParser(); SingleBranchLVT = Parser.ParseJsonLVTFromStream(streamReader); }
public void ParseJsonLVT() { //this opens the TestLVT file stored in the project's resources Stream TestStream = new MemoryStream(Properties.Resources.TestLVT); StreamReader TestStreamReader = new StreamReader(TestStream); JsonParser TestParser = new JsonParser(); LeanValueTree TestSingleBranchLVT = TestParser.ParseJsonLVTFromStream(TestStreamReader); Assert.IsInstanceOf(typeof(LeanValueTree), TestSingleBranchLVT, "ParseJsonLVT should return LeanValueTree object"); Assert.AreNotEqual(null, TestSingleBranchLVT.Vision, "ParseJsonLVT should populate objects inside the LVT"); }