public void Setup()
 {
     var info = new TestRunInformation();
     info.Name = "TESTNAME";
     var chain = new CallChain("TestRoot", "TestRootR", 1);
     chain.StartTime = 0;
     chain.EndTime = 10;
     var c = new CallChain("TestChild1", "TestChild1R", 2);
     c.StartTime = 1;
     c.EndTime = 2;
     chain.AddChild(c);
     var c2 = new CallChain("TestChild2", "TestChild2R", 3);
     c2.StartTime = 3;
     c2.EndTime = 9;
     chain.AddChild(c2);
     var child = new CallChain("TestChild3", "TestChild3R", 4);
     child.StartTime = 4;
     child.EndTime = 8;
     var grandchild = new CallChain("TestGrandChild", "TestGrandChildR", 5);
     grandchild.StartTime = 5;
     grandchild.EndTime = 7;
     child.AddChild(grandchild);
     chain.AddChild(child);
     info.TestChain = chain;
     projection = new CouplingCountAndNameProjection();
     projection.Index(info);
 }
        public void Setup()
        {
            var info = new TestRunInformation();

            info.Name = "TESTNAME";
            var chain = new CallChain("TestRoot", "TestRootR", 1);

            chain.StartTime = 0;
            chain.EndTime   = 10;
            var c = new CallChain("TestChild1", "TestChild1R", 2);

            c.StartTime = 1;
            c.EndTime   = 2;
            chain.AddChild(c);
            var c2 = new CallChain("TestChild2", "TestChild2R", 3);

            c2.StartTime = 3;
            c2.EndTime   = 9;
            chain.AddChild(c2);
            var child = new CallChain("TestChild3", "TestChild3R", 4);

            child.StartTime = 4;
            child.EndTime   = 8;
            var grandchild = new CallChain("TestGrandChild", "TestGrandChildR", 5);

            grandchild.StartTime = 5;
            grandchild.EndTime   = 7;
            child.AddChild(grandchild);
            chain.AddChild(child);
            info.TestChain = chain;
            projection     = new CouplingCountAndNameProjection();
            projection.Index(info);
        }
 public void an_exception_is_thrown()
 {
     string filename = Path.GetTempFileName();
     File.WriteAllText(filename, "this really is not a valid snapshot.");
     _projection = new CouplingCountAndNameProjection();
     _projection.LoadFromSnapshot(filename);
 }
        public void an_exception_is_thrown()
        {
            string filename = Path.GetTempFileName();

            File.WriteAllText(filename, "this really is not a valid snapshot.");
            _projection = new CouplingCountAndNameProjection();
            _projection.LoadFromSnapshot(filename);
        }
Exemple #5
0
        public void test_information_with_null_name_to_remove_does_not_fail()
        {
            var counts = new CouplingCountAndNameProjection();

            Assert.DoesNotThrow(() => counts.Remove(new TestRunInformation()
            {
                Name = null
            }));
        }
 public void Setup()
 {
     var info = new TestRunInformation
                    {
                        Name = "TESTNAME",
                        TestChain = TestData.BuildChainWithPrefix("Foo+Test::")
                    };
     projection = new CouplingCountAndNameProjection();
     projection.Index(info);
 }
        public void Setup()
        {
            var info = new TestRunInformation
            {
                Name      = "TESTNAME",
                TestChain = TestData.BuildChainWithPrefix("Foo+Test::")
            };

            projection = new CouplingCountAndNameProjection();
            projection.Index(info);
        }
 public void an_exception_is_thrown()
 {
     const string filename = "C:\\thisreallyshouldntexist.whatever";
     var info = new TestRunInformation
                    {
                        Name = "TESTNAME",
                        TestChain = TestData.BuildChainWithPrefix("Test")
                    };
     _projection = new CouplingCountAndNameProjection();
     _projection.LoadFromSnapshot(filename);
 }
        public void an_exception_is_thrown()
        {
            const string filename = "C:\\thisreallyshouldntexist.whatever";
            var          info     = new TestRunInformation
            {
                Name      = "TESTNAME",
                TestChain = TestData.BuildChainWithPrefix("Test")
            };

            _projection = new CouplingCountAndNameProjection();
            _projection.LoadFromSnapshot(filename);
        }
 public void Setup()
 {
     var filename = Path.GetTempFileName();
     var info = new TestRunInformation
                    {
                        Name = "TESTNAME",
                        TestChain = TestData.BuildChainWithPrefix("Test")
                    };
     _projection = new CouplingCountAndNameProjection();
     _projection.Index(info);
     _projection.SnapShotTo(filename, 2048);
     _counts.Add(_projection.GetRuntimeCallTimingsFor("TestRoot"));
     _counts.Add(_projection.GetRuntimeCallTimingsFor("TestChild1"));
     _counts.Add(_projection.GetRuntimeCallTimingsFor("TestChild2"));
     _counts.Add(_projection.GetRuntimeCallTimingsFor("TestChild3"));
     _counts.Add(_projection.GetRuntimeCallTimingsFor("TestGrandChild"));
     _projection = new CouplingCountAndNameProjection();
     position = _projection.LoadFromSnapshot(filename);
 }
        public void Setup()
        {
            var filename = Path.GetTempFileName();
            var info     = new TestRunInformation
            {
                Name      = "TESTNAME",
                TestChain = TestData.BuildChainWithPrefix("Test")
            };

            _projection = new CouplingCountAndNameProjection();
            _projection.Index(info);
            _projection.SnapShotTo(filename, 2048);
            _counts.Add(_projection.GetRuntimeCallTimingsFor("TestRoot"));
            _counts.Add(_projection.GetRuntimeCallTimingsFor("TestChild1"));
            _counts.Add(_projection.GetRuntimeCallTimingsFor("TestChild2"));
            _counts.Add(_projection.GetRuntimeCallTimingsFor("TestChild3"));
            _counts.Add(_projection.GetRuntimeCallTimingsFor("TestGrandChild"));
            _projection = new CouplingCountAndNameProjection();
            position    = _projection.LoadFromSnapshot(filename);
        }
Exemple #12
0
        public void null_test_information_to_remove_does_not_fail()
        {
            var counts = new CouplingCountAndNameProjection();

            Assert.DoesNotThrow(() => counts.Remove(null));
        }