Package org.apache.hivemind

Examples of org.apache.hivemind.Location


    public void testDefaultErrorHandlerWithLocation()
    {
        Log log = (Log) newMock(Log.class);

        Resource r = new ClasspathResource(getClassResolver(), "/foo/bar/Baz.module");
        Location l = new LocationImpl(r, 13);

        Throwable ex = new IllegalArgumentException();

        log.error("Error at classpath:/foo/bar/Baz.module, line 13: Bad frob value.", ex);
View Full Code Here


    public void testStrictErrorHandlerWithLocation()
    {
        ErrorHandler eh = new StrictErrorHandler();
        Throwable cause = new NullPointerException();
        Location l = newLocation();

        try
        {
            eh.error(null, "An error message.", l, cause);
            unreachable();
View Full Code Here

     *
     * @since 1.1
     */
    public void testErrorInInitializer() throws Exception
    {
        Location l = newLocation();

        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
                .getMock();

View Full Code Here

    }

    public void testNoServiceId()
    {
        ObjectProvider op = new BeanFactoryObjectProvider();
        Location l = newLocation();

        try
        {
            op.provideObject(null, null, "foo", l);
            unreachable();
View Full Code Here

    }

    public void testNoLocator()
    {
        ObjectProvider op = new BeanFactoryObjectProvider();
        Location l = newLocation();

        try
        {
            op.provideObject(null, null, "foo:", l);
            unreachable();
View Full Code Here

        schema.setModule(m1);

        SchemaProcessorImpl p = new SchemaProcessorImpl(null, schema);

        Location location1 = newLocation();
        ElementImpl element1 = new ElementImpl();
        element1.setElementName("cartoon");
        element1.addAttribute(new AttributeImpl("name", "flintstone"));
        element1.setLocation(location1);

        List elements1 = Collections.singletonList(element1);

        Location location2 = newLocation();
        ElementImpl element2 = new ElementImpl();
        element2.setElementName("cartoon");
        element2.addAttribute(new AttributeImpl("name", "flintstone"));
        element2.setLocation(location2);
View Full Code Here

        ModuleDefinition md = createModuleDefinition("test");
        XmlServicePointDefinitionImpl xmlSpd = new XmlServicePointDefinitionImpl(md);
        xmlSpd.setParametersCount(Occurances.REQUIRED);
        xmlSpd.setParametersSchema(schema);
       
        Location location = newLocation();
        InvokeFactoryServiceConstructor c = new InvokeFactoryServiceConstructor(location, "module");

        ErrorLog log = (ErrorLog) newMock(ErrorLog.class);

        // Training !
View Full Code Here

        schema.setId("Baz");
        schema.setVisibility(Visibility.PRIVATE);

        RegistryDefinition definition = new RegistryDefinitionImpl();

        Location l = newLocation();

        errorHandler.error(
                log,
                XmlImplMessages.schemaNotVisible("foo.bar.Baz", "zip.zoop"),
                l,
View Full Code Here

        Log log = LogFactory.getLog(XmlModuleDescriptorProcessor.class);

        RegistryDefinition definition = new RegistryDefinitionImpl();

        Location l = newLocation();

        errorHandler.error(log, XmlImplMessages.unableToResolveSchema("foo.bar.Baz"), l, null);

        replayControls();
View Full Code Here

        RegistryDefinition definition = new RegistryDefinitionImpl();

        Log log = LogFactory.getLog(XmlModuleDescriptorProcessor.class);

        Location location = newLocation();

        eh.error(
                log,
                "Unexpected token <AND> in expression 'and class foo'.",
                location,
View Full Code Here

TOP

Related Classes of org.apache.hivemind.Location

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.