Esempio n. 1
0
        public void add_comment()
        {
            var test = new Test("some test");

            test.AddComment("some text");
            test.Parts[0].ShouldBeOfType<Comment>().Text.ShouldEqual("some text");
        }
Esempio n. 2
0
 private void readFromChildNode(INode node, Test test)
 {
     if (node.IsComment())
     {
         test.AddComment(node.InnerText);
     }
     else if (node.IsTags())
     {
         test.AddTags(node.InnerText);
     }
     else
     {
         Section section = ReadSection(node);
         test.Add(section);
     }
 }
Esempio n. 3
0
        public void SetUp()
        {
            var project = new Project
            {
                BinaryFolder = string.Empty,
                ProjectFolder = "",
                TestFolder = ""
            };
            test = new Test("Test001");
            test.AddComment("some comment");

            project.Save(test);

            project.RenameTest(test, "New Name");
        }
Esempio n. 4
0
        public void delete_a_test_file()
        {
            var project = new Project
            {
                BinaryFolder = string.Empty,
                ProjectFolder = "",
                TestFolder = ""
            };
            var test = new Test("test to be saved");
            test.AddComment("some comment");
            test.FileName = "Test001.xml";

            project.Save(test);

            File.Exists("Test001.xml").ShouldBeTrue();
            project.DeleteFile(test);
            File.Exists("Test001.xml").ShouldBeFalse();
        }
Esempio n. 5
0
        public void save_and_load_a_test()
        {
            var project = new Project
            {
                BinaryFolder = string.Empty,
                ProjectFolder = "",
                TestFolder = ""
            };
            var test = new Test("test to be saved");
            test.AddComment("some comment");
            test.FileName = "Test001.xml";

            project.Save(test);

            Test test2 = new TestReader().ReadFromFile(test.FileName);
            test2.Name.ShouldEqual(test.Name);
            test2.Parts.Count.ShouldEqual(1);

            test2.FileName.ShouldEqual("Test001.xml");
        }