Esempio n. 1
0
        public void TestMethod_PickStrParameter()
        {
            string[] testDataList = new string[] { " public void TestMethod_MySplitIntEnd()", "12123123sdfsfsferfgffdfdf", "aaaaaaaaaaaaabbb", "aaaaaaaaaa" };
            string   targetStr    = MyAssert.PickStrParameter("void ", "()", testDataList[0]);

            Assert.IsTrue(targetStr == "TestMethod_MySplitIntEnd", targetStr);
            targetStr = MyAssert.PickStrParameter("void ", "()", testDataList[1]);
            Assert.IsTrue(targetStr == null, targetStr);
            targetStr = MyAssert.PickStrParameter("aaa", "b", testDataList[2]);
            Assert.IsTrue(targetStr == "aaaaaaaaaa", targetStr);
            targetStr = MyAssert.PickStrParameter("aaa", "aaa", testDataList[3]);
            Assert.IsTrue(targetStr == "", targetStr);
        }