コード例 #1
0
        public void TestGetJSONVersion()
        {
            string filename = @"c:\My Projects\Task Scheduler";
            myFile json     = getTools.openJSON(filename);

            SpeedBump.Version result   = getTools.getjsonVersion(json);
            string            expected = "1.0.0.0";

            Assert.IsNotNull(expected);
            Assert.AreEqual(expected, result.getVersion());
        }
コード例 #2
0
        public void TestParseJson()
        {
            myFile json     = new myFile();
            string expected = "1.0.0.0";

            SpeedBump.Version ver = new SpeedBump.Version();
            json.setFilename(@"c:\My Projects\TT Gateway");
            json.add("version : \"1.0.0.0\"");
            ver = getTools.getjsonVersion(json);

            Assert.AreEqual(expected, ver.getVersion());
        }