Esempio n. 1
0
        public void Can_parse_checklist()
        {
            var json      = File.ReadAllText("./Data/checklist.json");
            var checklist = new ChecklistFactory().Parse(json);

            TestDataHelper.ChecklistTreeStructureShouldBeConsistent(checklist);
        }
Esempio n. 2
0
        public void Can_serialize_then_parse_checklist()
        {
            TestDataHelper.ChecklistTreeStructureShouldBeConsistent(checklist_);
            var    checklistFactory = new ChecklistFactory();
            string json             = checklistFactory.Serialize(checklist_);
            var    checklist        = checklistFactory.Parse(json);

            TestDataHelper.ChecklistTreeStructureShouldBeConsistent(checklist);
        }
Esempio n. 3
0
        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);
        }