-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added simple Gradle support (only .war)
Added support for edoras one 1.6 Added support for SNAPSHOT versions Creation of sample component test class
- Loading branch information
Showing
11 changed files
with
96 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/resources/templates/SampleComponentTest16.java.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package {{packageName}}; | ||
|
||
import com.edorasware.gear.core.task.Task; | ||
import com.edorasware.gear.core.task.TaskId; | ||
import com.edorasware.gear.core.task.TaskService; | ||
import com.edorasware.one.document.viewer.DocumentViewerController; | ||
import com.edorasware.one.micro.testing.AbstractComponentTest; | ||
import com.edorasware.one.micro.testing.annotations.EdorasTestLogin; | ||
import org.junit.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
/** | ||
* Small test that just checks whether the context is successfully started | ||
*/ | ||
@EdorasTestLogin(login = "{{shortName}}-admin") | ||
public class SampleComponentTest extends AbstractComponentTest { | ||
|
||
// You can inject beans from the root context (edoras one context) | ||
@Autowired | ||
private TaskService taskService; | ||
|
||
// You can inject beans from rest service context (edoras one dispatcher servlet context) | ||
@Autowired | ||
private DocumentViewerController documentViewerController; | ||
|
||
@Test | ||
public void addCase() { | ||
final String taskName = "taskName"; | ||
TaskId taskId = this.taskService.addTask(Task.builder().name(taskName).build(), "Add a task"); | ||
Task task = this.taskService.findTaskById(taskId); | ||
assertEquals("The task name must be equal", taskName, task.getName()); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters