public void TestBySampleData()
        {
            var testData = "Assets/VitDeck/Validator/Tests/Data/MissingReferenceRule";
            var rule     = new MissingReferenceRule("missing検出ルール");
            var target   = new ValidationTargetFinder().Find(testData, true);

            var result = rule.Validate(target);

            Assert.That(result.Issues.Count, Is.EqualTo(5));

            Assert.NotNull(result.Issues.Find(issue =>
                                              issue.message == "missingプレハブが含まれています!(Missing Prefab)" &&
                                              issue.target == GameObject.Find("Missing Prefab")));

            Assert.NotNull(result.Issues.Find(issue =>
                                              issue.message == "missingコンポーネントが含まれています!(MissingScriptObject)" &&
                                              issue.target == GameObject.Find("MissingScriptObject")));

            Assert.NotNull(result.Issues.Find(issue =>
                                              issue.message == "missingフィールドが含まれています!(MissingTestMaterial > _MainTex)" &&
                                              issue.target == AssetDatabase.LoadMainAssetAtPath(testData + "/MissingTestMaterial.mat")));

            Assert.NotNull(result.Issues.Find(issue =>
                                              issue.message == "missingフィールドが含まれています!(RecursiveMissingTestPrefabChild > EventTrigger > Target)" &&
                                              issue.target == AssetDatabase.LoadMainAssetAtPath(testData + "/RecursiveMissingTestPrefabChild.prefab")));

            Assert.NotNull(result.Issues.Find(issue =>
                                              issue.message == "missingコンポーネントが含まれています!(RecursiveMissingTestPrefabChild)" &&
                                              issue.target == AssetDatabase.LoadMainAssetAtPath(testData + "/RecursiveMissingTestPrefabChild.prefab")));
        }
        public void TestAssetReferenceMissing()
        {
            var rule       = new MissingReferenceRule("missing検出ルール");
            var gameObject = new GameObject("TestObject");
            var target     = new ValidationTarget("Assets/VitDeck/Validator/Tests", allObjects: new GameObject[] { gameObject });

            var meshAsset  = new TestMeshAsset(rootFolder.Path);
            var meshFilter = gameObject.AddComponent <MeshFilter>();

            meshFilter.mesh = AssetDatabase.LoadAssetAtPath <Mesh>(meshAsset.Path);
            meshAsset.Dispose();

            var result = rule.Validate(target);

            Assert.That(result.Issues.Count, Is.EqualTo(1));
            Assert.That(result.Issues[0].message,
                        Is.EqualTo(string.Format("missingフィールドが含まれています!({0} > {1} > Mesh)", gameObject.name, typeof(MeshFilter).Name)));
            Assert.That(result.Issues[0].target, Is.EqualTo(meshFilter));
        }