/** * Returns a {@link TestClass} object wrapping the class to be executed. This method is required for testing because * {@link #getTestClass()} is final and therefore cannot be stubbed :( */ TestClass getTestClassInt() { return getTestClass(); }
/** * <p> * This method is package private (= visible) for testing. * </p> */ TestClass findDataProviderLocation(UseDataProvider useDataProvider) { if (useDataProvider.location().length == 0) { return getTestClassInt(); } return new TestClass(useDataProvider.location()[0]); }
@DataProvider public static Object[][] emptyAfterTrim() { return new Object[][] { {""}, {" "}, {" "} }; }
@DataProvider public static Object[][] datasetIdSupportedLengths() { return new Object[][] { {ServerId.NOT_UUID_DATASET_ID_LENGTH}, {UUID_DATASET_ID_LENGTH}, }; } }
@DataProvider public static Object[][] allRenamingCases() { return new Object[][] { {"repo1", "rule1", "repo1", "rule2"}, {"repo1", "rule1", "repo2", "rule1"}, {"repo1", "rule1", "repo2", "rule2"}, }; }
@DataProvider public static Object[][] organizationEnabledFlags() { return new Object[][] { {true}, {false} }; }
@DataProvider public static Object[][] branchBranchTypes() { return new Object[][] { {BranchType.SHORT}, {BranchType.LONG} }; }
@DataProvider public static Object[][] allValuesForSelect() { return new Object[][] { {null, ""}, {"", ""}, {"some value", "some value"}, {VALUE_SIZE_4000, VALUE_SIZE_4000}, {VALUE_SIZE_4001, VALUE_SIZE_4001} }; }
@DataProvider public static Object[][] nullOrEmpty() { return new Object[][] { {null}, {""} }; }
@DataProvider public static Object[][] valid_values() { return new Object[][] { {INT, "10"}, {MILLISEC, "1000"}, {WORK_DUR, "1000"}, {FLOAT, "5.12"}, {PERCENT, "10.30"}, }; }
@DataProvider public static Object[][] booleanValues() { return new Object[][] { {true}, {false} }; }
@DataProvider public static Object[][] statusOrResolutionFieldName() { return new Object[][] { {"status"}, {"resolution"}, }; }
@DataProvider public static Object[][] branchTypes() { return new Object[][] { {BranchType.LONG}, {BranchType.SHORT}, {BranchType.PULL_REQUEST} }; }
@DataProvider public static Object[][] stringsWithChar0() { return new Object[][] { {"\u0000", ""}, {"\u0000\u0000\u0000\u0000", ""}, {"\u0000 \u0000a\u0000b\u0000 ", " ab "}, {"a \u0000 0message", "a 0message"} }; } }
@DataProvider public static Object[][] beforeAndAfterBlanks() { return new Object[][] { {"", ""}, {" ", ""}, {"", " "}, {" ", " "}, }; } }
@DataProvider public static Object[][] ratings() { return new Object[][] { {Rating.A, Color.RATING_A}, {Rating.B, Color.RATING_B}, {Rating.C, Color.RATING_C}, {Rating.D, Color.RATING_D}, {Rating.E, Color.RATING_E} }; }
@DataProvider public static Object[][] indexOfFailingProjectDeletion() { return new Object[][] { {0}, {1}, {2} }; }
@DataProvider public static Object[][] unsupportedMetricTypes() { return new Object[][] { {BOOL}, {STRING}, {DATA}, {DISTRIB} }; }
@DataProvider public static Object[][] workerUuidValidValues() { return new Object[][] { {null}, {""}, {"bar"}, {STR_40_CHARS} }; }
@DataProvider public static Object[][] emptyStrings() { return new Object[][] { {""}, {" "}, {" "}, }; }