public void Can_parse_checklist() { var json = File.ReadAllText("./Data/checklist.json"); var checklist = ChecklistFactory.Parse(json); ChecklistTestHelper.ChecklistTreeStructureShouldBeConsistent(checklist); }
public void Can_serialize_then_parse_checklist() { ChecklistTestHelper.ChecklistTreeStructureShouldBeConsistent(checklist_); string json = ChecklistFactory.Serialize(checklist_); var checklist = ChecklistFactory.Parse(json); ChecklistTestHelper.ChecklistTreeStructureShouldBeConsistent(checklist); }
public void Can_serialize_then_parse_autoset() { TestDataHelper.ChecklistTreeStructureShouldBeConsistent(checklist_); checklist_.Find("R1,P2").SetAuto(); var checklistFactory = new ChecklistFactory(); string json = checklistFactory.Serialize(checklist_); var checklist = checklistFactory.Parse(json); TestDataHelper.ChecklistTreeStructureShouldBeConsistent(checklist); checklist.Find("R1,P2").IsAutoSet.Should().Be(true); }