示例#1
0
        public void TestSubNodesExist()
        {
            ArtiObject meta = _sw_desc["$Meta"];

            var meta_keys  = meta.Keys();
            var collection = meta_keys as string[] ?? meta_keys.ToArray();

            CollectionAssert.Contains(collection, "description");
            CollectionAssert.Contains(collection, "merge_sources");
            CollectionAssert.Contains(collection, "generator");
            CollectionAssert.Contains(collection, "date");

            ArtiObject app_values = _sw_desc["$Classes"]["AR_CORE"]["states"]["CURRENTAPPLICATION"]["values"];
            var        app_keys   = app_values.Keys();
            var        enumerable = app_keys as string[] ?? app_keys.ToArray();

            CollectionAssert.Contains(enumerable, "0");
            CollectionAssert.Contains(enumerable, "1");
            CollectionAssert.Contains(enumerable, "2");
        }
示例#2
0
 public void Setup()
 {
     _sw_desc = new ArtiObject(Helpers.ReadTestFile("SystemDescription.arti"));
     Assert.NotNull(_sw_desc, "Should see model");
 }