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