Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Added IntegrationTest classes to new package
Browse files Browse the repository at this point in the history
  • Loading branch information
sclaresmt committed Apr 12, 2016
1 parent 307c157 commit 2786e95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
Expand Up @@ -29,7 +29,7 @@ public class IntegrationTestCommands implements CommandMarker {
@Reference
private TypeLocationService typeLocationService;

@CliAvailabilityIndicator({"test integration", "test unit"})
@CliAvailabilityIndicator({"test integration"})
public boolean isPersistentClassAvailable() {
return integrationTestOperations.isIntegrationTestInstallationPossible();
}
Expand Down Expand Up @@ -62,27 +62,4 @@ public void newIntegrationTest(
integrationTestOperations.newIntegrationTest(entity, transactional);
}

@CliCommand(value = "test unit", help = "Creates a unit test class for the specified class")
public void newMockTest(
@CliOption(key = "class", mandatory = true, optionContext = UPDATE_PROJECT,
help = "The name of the project class which this unit test class is targeting") final JavaType projectType,
@CliOption(key = "permitReservedWords", mandatory = false, unspecifiedDefaultValue = "false",
specifiedDefaultValue = "true",
help = "Indicates whether reserved words are ignored by Roo") final boolean permitReservedWords) {

// Check if specified type exists in the project
String physicalTypeIdentifier = typeLocationService.getPhysicalTypeIdentifier(projectType);
if (physicalTypeIdentifier == null) {
throw new IllegalArgumentException(String.format(
"The class '%s' doesn't exists in the project. Please, specify an existing class",
projectType));
}

if (!permitReservedWords) {
ReservedWords.verifyReservedWordsNotPresent(projectType);
}

integrationTestOperations.newUnitTest(projectType);
}

}
@@ -1,6 +1,6 @@
package org.springframework.roo.addon.test.addon;

import org.springframework.roo.addon.test.addon.IntegrationTestAnnotationValues;
import org.springframework.roo.addon.test.addon.integration.IntegrationTestAnnotationValues;
import org.springframework.roo.addon.test.annotations.RooIntegrationTest;
import org.springframework.roo.classpath.details.annotations.populator.AnnotationValuesTestCase;

Expand Down

0 comments on commit 2786e95

Please sign in to comment.