Package intellijcoder.model

Examples of intellijcoder.model.Problem


    }


    @Test
    public void repeatingCallsToBuildGenerateTheSameCode() throws Exception {
        Problem problem = make(a(Problem));
        String code1 = testCodeBuilder.build(problem);
        String code2 = testCodeBuilder.build(problem);
        assertEquals("generated code", code1, code2);
    }
View Full Code Here


        }
        if(theSameProblemWasJustOpened(componentModel)) {
            return;
        }
        try {
            Problem problem = extractProblem(componentModel);
            workspaceManager.createProblemWorkspace(problem);
            setCurrentProblem(problem);
            messagePanel.showInfoMessage(WORKSPACE_CREATED_MESSAGE);
        } catch (IntelliJCoderException e) {
            messagePanel.showErrorMessage(e.getMessage());
View Full Code Here

        IntelliJCoderServer server = new IntelliJCoderServer(workspaceManager, new Network());

        int port = server.start();
        IntelliJCoderClient client = new IntelliJCoderClient(new Network(), port);

        Problem problem = sampleProgram();
        client.createProblemWorkspace(problem);

        workspaceManager.hasReceivedProblemEqualTo(problem);
    }
View Full Code Here

            allowing(inputComponentModel).getParamTypes();   will(returnValue(new DataType[0]));
            allowing(inputComponentModel).getParamNames();   will(returnValue(new String[0]));
            allowing(inputComponentModel).getTestCases();    will(returnValue(new com.topcoder.shared.problem.TestCase[] {new com.topcoder.shared.problem.TestCase(1, new String[0], "1", false)}));
        }});
        TestCase testCase = make(a(TestCase, with(input, new String[0]), with(output, "1")));
        Problem expectedProblem = make(a(Problem,
                with(className, "BinaryCode"),
                with(returnType, "int"),
                with(methodName, "multiply"),
                with(testCases, new TestCase[]{testCase})));
View Full Code Here

        String returnType = componentModel.getReturnType().getDescriptor(JavaLanguage.JAVA_LANGUAGE);
        String methodName = componentModel.getMethodName();
        String[] paramTypes = extractTypes(componentModel.getParamTypes());
        String[] paramNames = componentModel.getParamNames();
        TestCase[] testCases = extractTestCases(componentModel.getTestCases());
        return new Problem(className, returnType, methodName, paramTypes, paramNames, testCases);
    }
View Full Code Here

    public String getSolutionSource(String className) {
        return null;
    }

    public void hasReceivedProblemEqualTo(Problem expectedProblem) throws InterruptedException {
        Problem receviedProblem = receivingProblemQueue.poll(TIMEOUT, SECONDS);
        assertNotNull("hasn't received problem data in "+TIMEOUT+" seconds", receviedProblem);
        assertEquals("Problem", expectedProblem, receviedProblem);
    }
View Full Code Here

TOP

Related Classes of intellijcoder.model.Problem

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.