Package com.indeed.proctor.common

Examples of com.indeed.proctor.common.ProctorSpecification


        final Reader matrixResource = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(SPECIFICATION_MATRIX)));
        final StringWriter matrixString = new StringWriter();
        CharStreams.copy(matrixResource, matrixString);


        final ProctorSpecification specification = getProctorSpecification();
        final StringProctorLoader loader = new StringProctorLoader(specification, SPECIFICATION_MATRIX, matrixString.toString());

        assertTrue("StringProctorLoader should load", loader.load());
        return loader.get();
    }
View Full Code Here


        final Reader matrixResource = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(SPECIFICATION_MATRIX)));
        final StringWriter matrixString = new StringWriter();
        CharStreams.copy(matrixResource, matrixString);


        final ProctorSpecification specification = getProctorSpecification();
        final StringProctorLoader loader = new StringProctorLoader(specification, SPECIFICATION_MATRIX, matrixString.toString());
        assertTrue("StringProctorLoader should load", loader.load());
        return loader.get();
    }
View Full Code Here

                    throw new CodeGenException("Could not read json correctly " + child.getAbsolutePath(),e);
                }
                testSpec.put(childName.substring(0, childName.indexOf(".json")),spec);
            }
        }
        final ProctorSpecification proctorSpecification = new ProctorSpecification();
        proctorSpecification.setTests(testSpec);
        proctorSpecification.setProvidedContext(providedContext);

        final File output =  new File(targetDir, name);
        try {
            OBJECT_MAPPER.defaultPrettyPrintingWriter().writeValue(output, proctorSpecification);
        } catch (IOException e) {
View Full Code Here

    }

    @Override
    protected Map<String, Object> populateRootMap(final String input, final Map<String, Object> baseContext, final String packageName, final String className) {
        final File inputFile = new File(input);
        final ProctorSpecification spec = ProctorUtils.readSpecification(inputFile);

        return populateRootMap(spec, baseContext, packageName, className);
    }
View Full Code Here

        try {
            if (resourceAsStream == null) {
                throw new ServletException("No resource stream for proctorSpecPath " + proctorSpecPath);
            }

            final ProctorSpecification specification = OBJECT_MAPPER.readValue(resourceAsStream, ProctorSpecification.class);
            results.setSpecification(specification);
        } catch (final Throwable t) {
            final String message = "Unable to parse specification in " + proctorSpecPath;

            LOGGER.error(message, t);
View Full Code Here

TOP

Related Classes of com.indeed.proctor.common.ProctorSpecification

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.