Package org.springframework.roo.classpath.details

Examples of org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails


        when(mockMetadataService.get(pluralId)).thenReturn(mockPluralMetadata);
    }

    @Test
    public void testGetAdditionsForBogusMethod() {
        final ClassOrInterfaceTypeDetails mockServiceInterface = mock(ClassOrInterfaceTypeDetails.class);
        assertAdditions("x", Arrays.asList(mockServiceInterface), BOGUS_METHOD,
                null);
    }
View Full Code Here


                FIND_ALL.getKey(), null);
    }

    @Test
    public void testGetAdditionsForFindAllMethodWhenServiceDoesNotProvideIt() {
        final ClassOrInterfaceTypeDetails mockServiceInterface = getMockService(
                "", "x", "x", "x");
        assertAdditions("x", Arrays.asList(mockServiceInterface),
                FIND_ALL.getKey(), null);
    }
View Full Code Here

                FIND_ALL.getKey(), null);
    }

    @Test
    public void testGetAdditionsForFindAllMethodWhenServiceProvidesIt() {
        final ClassOrInterfaceTypeDetails mockServiceInterface = getMockService(
                "findPerson", "", "x", "x");
        assertAdditions("s", Arrays.asList(mockServiceInterface),
                FIND_ALL.getKey(), "personService.findPersons()");
    }
View Full Code Here

                FIND_ALL.getKey(), "personService.findPersons()");
    }

    @Test
    public void testGetAdditionsForFindEntriesMethodWhenServiceDoesNotProvideIt() {
        final ClassOrInterfaceTypeDetails mockServiceInterface = getMockService(
                "x", "x", "x", "");
        assertAdditions("x", Arrays.asList(mockServiceInterface),
                FIND_ENTRIES.getKey(), null, START_PARAMETER, SIZE_PARAMETER);
    }
View Full Code Here

                FIND_ENTRIES.getKey(), null, START_PARAMETER, SIZE_PARAMETER);
    }

    @Test
    public void testGetAdditionsForFindEntriesMethodWhenServiceProvidesIt() {
        final ClassOrInterfaceTypeDetails mockServiceInterface = getMockService(
                "x", "x", "x", "locate");
        assertAdditions("z", Arrays.asList(mockServiceInterface),
                FIND_ENTRIES.getKey(),
                "personService.locatePersonEntries(start, count)",
                START_PARAMETER, SIZE_PARAMETER);
View Full Code Here

                START_PARAMETER, SIZE_PARAMETER);
    }

    @Test
    public void testGetAdditionsForSaveMethodWhenServiceDoesNotProvideIt() {
        final ClassOrInterfaceTypeDetails mockServiceInterface = getMockService(
                "x", null, "x", "x");
        final MethodParameter methodParameter = new MethodParameter(
                mockTargetType, "anything");
        assertAdditions("x", Arrays.asList(mockServiceInterface),
                SAVE.getKey(), null, methodParameter);
View Full Code Here

                SAVE.getKey(), null, methodParameter);
    }

    @Test
    public void testGetAdditionsForSaveMethodWhenServiceProvidesIt() {
        final ClassOrInterfaceTypeDetails mockServiceInterface = getMockService(
                "x", "save", "x", "x");
        final MethodParameter methodParameter = new MethodParameter(
                mockTargetType, "user");
        assertAdditions("x", Arrays.asList(mockServiceInterface),
                SAVE.getKey(), "personService.savePerson(user)",
View Full Code Here

                methodParameter);
    }

    @Test
    public void testGetAdditionsForUpdateMethodWhenServiceDoesNotProvideIt() {
        final ClassOrInterfaceTypeDetails mockServiceInterface = getMockService(
                "x", "x", "", "x");
        final MethodParameter methodParameter = new MethodParameter(
                mockTargetType, "employee");
        assertAdditions("x", Arrays.asList(mockServiceInterface),
                UPDATE.getKey(), null, methodParameter);
View Full Code Here

                UPDATE.getKey(), null, methodParameter);
    }

    @Test
    public void testGetAdditionsForUpdateMethodWhenServiceProvidesIt() {
        final ClassOrInterfaceTypeDetails mockServiceInterface = getMockService(
                "x", "x", "change", "x");
        final MethodParameter methodParameter = new MethodParameter(
                mockTargetType, "bob");
        assertAdditions("x", Arrays.asList(mockServiceInterface),
                UPDATE.getKey(), "personService.changePerson(bob)",
View Full Code Here

                methodParameter);
    }

    @Test
    public void testGetAdditionsWhenServiceAnnotationValuesUnavailable() {
        final ClassOrInterfaceTypeDetails mockServiceInterface = mock(ClassOrInterfaceTypeDetails.class);
        assertAdditions("anything", Arrays.asList(mockServiceInterface),
                BOGUS_METHOD, null);
    }
View Full Code Here

TOP

Related Classes of org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails

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.