示例#1
0
        public void TestSelectClonePassAndTests()
        {
            var  reader = new LogSubstringReader("");
            Pass pass   = reader.ExtractOnePassBySubString(onePassTextWith2Tests);
            Pass clone  = pass.PassClonedWithBasicProperties;

            clone.listTests = pass.listTests.Where((x, i) => i == 0).ToList();
            Assert.AreEqual(1, clone.listTests.Count);
            clone.listTests[0].SN = "XXX";
            Assert.AreEqual(pass.listTests[0].SN, clone.listTests[0].SN);
        }
示例#2
0
        public void TestExtractOnePassFromInput()
        {
            var  reader = new LogSubstringReader("");
            Pass pass   = reader.ExtractOnePassBySubString(onePassTextWith2Tests);

            Assert.AreEqual("26-FEB-16  14:10:50", pass.StartDateString);
            Assert.AreEqual(new DateTime(2016, 2, 26, 14, 10, 50), pass.StartDate);
            Assert.AreEqual("26-FEB-16  14:52:14", pass.EndDate);
            Assert.AreEqual(2, pass.listTests.Count);
            Assert.AreEqual("E", pass.listTests[0].Status);
            Assert.AreEqual("SS160605E", pass.listTests[1].SN);
        }