Beispiel #1
0
        void testPrefab(string prefabName, ErrorType errorType)
        {
            var go     = getPrefab(prefabName);
            var errors = ObjectValidator.check(ObjectValidator.CheckContext.empty, new[] { go });

            errors.shouldHave(errorType);
        }
Beispiel #2
0
        public static void shouldFindErrors <A>(
            ErrorType errorType, Act <A> setupA = null
            ) where A : Component
        {
            var go     = setupComponent(setupA).gameObject;
            var errors = ObjectValidator.check(ObjectValidator.CheckContext.empty, new Object[] { go });

            errors.shouldHave(errorType);
        }
Beispiel #3
0
 public static void shouldHave(this ImmutableList <ObjectValidator.Error> errors, ErrorType type) =>
 errors.shouldMatch(
     t => t.Exists(x => x.type == type),
     $"{type} does not exist in errors {errors.asDebugString()}"
     );
Beispiel #4
0
 public static void shouldFindErrors <A>(
     ErrorType errorType, Act <A> setup = null
     ) where A : Component =>
 checkForErrors(() => setupGOWithComponent(setup)).shouldHave(errorType);