Examples of runJsFunction()


Examples of org.candlepin.policy.js.JsRunner.runJsFunction()

    public void additivePropertiesCanStillDeserialize() {
        JsRunner mockRunner = mock(JsRunner.class);
        compliance = new ComplianceRules(mockRunner,
            entCurator, new StatusReasonMessageGenerator(i18n), eventSinkProvider,
            consumerCurator);
        when(mockRunner.runJsFunction(any(Class.class), eq("get_status"),
            any(JsContext.class))).thenReturn("{\"unknown\": \"thing\"}");
        Consumer c = mockConsumerWithTwoProductsAndNoEntitlements();

        // Nothing to assert here, we just need to see this return without error.
        compliance.getStatus(c, TestUtil.createDate(2011, 8, 30));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.