@Test public void testGetParameterRowWhenParameterNamesNotNull() { String className = "com.epam.test.TestClass"; int rowNumber = 1; String[] arrayElement = new String[]{"something"}; String[] parameterNames = new String[]{"PAR0"}; Whitebox.setInternalState(underTest, "parameterArray", parameterArray); given(parameterArray.get(rowNumber)).willReturn(arrayElement); DataDrivenParameters actual = underTest.getParameterRow(className, rowNumber); Assert.assertArrayEquals(parameterNames, actual.getParameterNames()); Assert.assertArrayEquals(arrayElement, actual.getParameters()); }
public DataDrivenParameters getParameterRow(final String className, final int drivenDataRowNo) { String[] p = parameterArray.get(drivenDataRowNo); DataDrivenParameters paramRow = new DataDrivenParameters(p, parameterArray.getParameterNames()); AllTestRunner.CONSOLE_LOG.info("Loaded: " + className + ", Data-driven test, loaded row:" + drivenDataRowNo + ", number of params:" + paramRow.getParameters().length); return paramRow; }
DataFeederLoader { public DataDrivenParameters getParameterRow(final String className, final int drivenDataRowNo) { String[] p = parameterArray.get(drivenDataRowNo); DataDrivenParameters paramRow = new DataDrivenParameters(p, parameterArray.getParameterNames()); AllTestRunner.CONSOLE_LOG.info("Loaded: " + className + ", Data-driven test, loaded row:" + drivenDataRowNo + ", number of params:" + paramRow.getParameters().length); return paramRow; } }
DataFeederLoader { public DataDrivenParameters getParameterRow(final String className, final int drivenDataRowNo) { String[] p = parameterArray.get(drivenDataRowNo); DataDrivenParameters paramRow = new DataDrivenParameters(p, parameterArray.getParameterNames()); AllTestRunner.CONSOLE_LOG.info("Loaded: " + className + ", Data-driven test, loaded row:" + drivenDataRowNo + ", number of params:" + paramRow.getParameters().length); return paramRow; } DataFeederLoader(final String className, final String feederDescriptor, final Environment environment); }
DataFeederLoader { public DataDrivenParameters getParameterRow(final String className, final int drivenDataRowNo) { String[] p = parameterArray.get(drivenDataRowNo); DataDrivenParameters paramRow = new DataDrivenParameters(p, parameterArray.getParameterNames()); AllTestRunner.CONSOLE_LOG.info("Loaded: " + className + ", Data-driven test, loaded row:" + drivenDataRowNo + ", number of params:" + paramRow.getParameters().length); return paramRow; } DataFeederLoader(final String className, final String feederDescriptor, final Environment environment); int calculateRuns(final String className, final int count); DataDrivenParameters getParameterRow(final String className, final int drivenDataRowNo); DataDrivenParameterArray calculateParameterArray(final String className, final DataDrivenParameterArray inputParameterArray); void reserveParameterArray(final DataDrivenParameterArray parameterArray); static void reportError(final String message); static void reportException(final String message, final Exception e); }
DataFeederLoader { public DataDrivenParameters getParameterRow(final String className, final int drivenDataRowNo) { String[] p = parameterArray.get(drivenDataRowNo); DataDrivenParameters paramRow = new DataDrivenParameters(p, parameterArray.getParameterNames()); AllTestRunner.CONSOLE_LOG.info("Loaded: " + className + ", Data-driven test, loaded row:" + drivenDataRowNo + ", number of params:" + paramRow.getParameters().length); return paramRow; } DataFeederLoader(final String className, final String feederDescriptor, final Environment environment); int calculateRuns(final String className, final int count); DataDrivenParameters getParameterRow(final String className, final int drivenDataRowNo); DataDrivenParameterArray calculateParameterArray(final String className, final DataDrivenParameterArray inputParameterArray); void reserveParameterArray(final DataDrivenParameterArray parameterArray); static void reportError(final String message); static void reportException(final String message, final Exception e);  }