void testPrefab(string prefabName, ErrorType errorType) { var go = getPrefab(prefabName); var errors = ObjectValidator.check(ObjectValidator.CheckContext.empty, new[] { go }); errors.shouldHave(errorType); }
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); }
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()}" );
public static void shouldFindErrors <A>( ErrorType errorType, Act <A> setup = null ) where A : Component => checkForErrors(() => setupGOWithComponent(setup)).shouldHave(errorType);