示例#1
0
        public void TestCreateConstantsEmptyReturnEmptyDict()
        {
            List <string> constant          = new List <string>();
            var           tool              = new CreateHelper();
            Dictionary <string, string> ret = tool.CreateConstants(constant);

            Assert.AreEqual(ret.Count, 0);
        }
示例#2
0
        public void TestCreateConstantsWrongLinesReturnNull()
        {
            List <string> constant = new List <string>()
            {
                "testLineNotTake",
                "testanotherLineNotTake&é\"'(-è_çà)+¹~#{[|`\\^@]}¤─./§%µ,;:!ù*",
            };
            var tool = new CreateHelper();
            Dictionary <string, string> ret = tool.CreateConstants(constant);

            Assert.AreEqual(ret.Count, 0);
        }
示例#3
0
        public void TestCreateConstants()
        {
            List <string> constant = new List <string>()
            {
                "constant1=value1=2",
                "constant2=value3",
            };
            var tool = new CreateHelper();
            Dictionary <string, string> ret = tool.CreateConstants(constant);

            Assert.AreEqual(ret["constant1"], "value1=2");
            Assert.AreEqual(ret["constant2"], "value3");
        }