Exemple #1
0
        public void ReadDataTest()
        {
            // Setup initial
            String   execPath     = AppDomain.CurrentDomain.BaseDirectory;
            String   jsonFullPath = Path.Combine(execPath, "Resources", "ControlList.json");
            FileInfo jsonPath     = new FileInfo(jsonFullPath);

            Assert.IsTrue(jsonPath.Exists);

            // Read data testing
            ControlList result = ControlList.ReadData(jsonPath);

            Assert.IsTrue(result.Controls.Count > 30);
            Assert.IsTrue(result.Controls.All(x => !String.IsNullOrEmpty(x.VB6)), "VB6 Name");
            Assert.IsTrue(result.Controls.Any(x => !String.IsNullOrEmpty(x.CSharp)), "CSharp Name");
            Assert.IsTrue(result.Controls.Any(x => x.InvisibleAtRuntime == true), "InvisibleAtRuntime");
            Assert.IsTrue(result.Controls.Any(x => x.Unsupported == true), "Unsupported");
        }