Package com.asakusafw.testdriver.core

Examples of com.asakusafw.testdriver.core.DataModelSourceFactory


    private void validateTestCondition() throws IOException {
        TestModerator moderator = new TestModerator(driverContext.getRepository(), driverContext);
        for (DriverInputBase<?> port : inputs) {
            String label = String.format("Input(%s)", port.getName());
            Class<?> type = port.getModelType();
            DataModelSourceFactory source = port.getSource();
            if (source != null) {
                moderator.validate(type, label, source);
            }
        }
        for (DriverOutputBase<?> port : outputs) {
            String label = String.format("Output(%s)", port.getName());
            Class<?> type = port.getModelType();
            DataModelSourceFactory source = port.getSource();
            if (source != null) {
                moderator.validate(type, label, source);
            }
            VerifierFactory verifier = port.getVerifier();
            if (verifier != null) {
View Full Code Here


        final ArrayList<DataModelReflection> results = new ArrayList<DataModelReflection>();
        for (T dataModel : sourceObjects) {
            results.add(definition.toReflection(dataModel));
        }
        results.trimToSize();
        return new DataModelSourceFactory() {
            @Override
            public <S> DataModelSource createSource(
                    DataModelDefinition<S> inner, TestContext context) throws IOException {
                if (inner.getModelClass() != definition.getModelClass()) {
                    throw new IllegalStateException();
View Full Code Here

     * @return the {@link DataModelSourceFactory}
     * @since 0.6.0
     */
    protected final DataModelSourceFactory toDataModelSourceFactory(
            final Provider<? extends Source<? extends T>> sourceProvider) {
        return new DataModelSourceFactory() {
            @SuppressWarnings({ "rawtypes", "unchecked" })
            @Override
            public DataModelSource createSource(
                    DataModelDefinition definition,
                    TestContext context) throws IOException {
View Full Code Here

    private void validateTestCondition() throws IOException {
        TestModerator moderator = new TestModerator(driverContext.getRepository(), driverContext);
        for (DriverInputBase<?> port : inputs) {
            String label = String.format("Input(%s)", port.getName());
            Class<?> type = port.getModelType();
            DataModelSourceFactory source = port.getSource();
            if (source != null) {
                moderator.validate(type, label, source);
            }
        }
        for (DriverOutputBase<?> port : outputs) {
            String label = String.format("Output(%s)", port.getName());
            Class<?> type = port.getModelType();
            DataModelSourceFactory source = port.getSource();
            if (source != null) {
                moderator.validate(type, label, source);
            }
            VerifierFactory verifier = port.getVerifier();
            if (verifier != null) {
View Full Code Here

        if (inputs == null) {
            throw new IllegalArgumentException("inputs must not be null"); //$NON-NLS-1$
        }
        if (context.isSkipPrepareInput() == false) {
            for (DriverInputBase<?> input : inputs) {
                DataModelSourceFactory source = input.getSource();
                if (source != null) {
                    String name = input.getName();
                    LOG.debug("入力{}を配置しています: {}", name, source);
                    ImporterDescription description = info.findImporter(name);
                    if (description == null) {
View Full Code Here

        if (outputs == null) {
            throw new IllegalArgumentException("outputs must not be null"); //$NON-NLS-1$
        }
        if (context.isSkipPrepareOutput() == false) {
            for (DriverOutputBase<?> output : outputs) {
                DataModelSourceFactory source = output.getSource();
                if (source != null) {
                    String name = output.getName();
                    LOG.debug("出力{}を配置しています: {}", name, source);
                    ExporterDescription description = info.findExporter(name);
                    if (description == null) {
View Full Code Here

    private void validateTestCondition(JobFlowTester flow, String id) throws IOException {
        TestModerator moderator = new TestModerator(driverContext.getRepository(), driverContext);
        for (DriverInputBase<?> port : flow.inputs) {
            String label = String.format("Input(flow=%s, name=%s)", id, port.getName());
            Class<?> type = port.getModelType();
            DataModelSourceFactory source = port.getSource();
            if (source != null) {
                moderator.validate(type, label, source);
            }
        }
        for (DriverOutputBase<?> port : flow.outputs) {
            String label = String.format("Output(flow=%s, name=%s)", id, port.getName());
            Class<?> type = port.getModelType();
            DataModelSourceFactory source = port.getSource();
            if (source != null) {
                moderator.validate(type, label, source);
            }
            VerifierFactory verifier = port.getVerifier();
            if (verifier != null) {
View Full Code Here

TOP

Related Classes of com.asakusafw.testdriver.core.DataModelSourceFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.