-
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebf205d
commit 778ad9e
Showing
2 changed files
with
64 additions
and
8 deletions.
There are no files selected for viewing
18 changes: 10 additions & 8 deletions
18
.../lite/generator/server/springboot/database/mssql/application/MssqlApplicationService.java
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 |
---|---|---|
@@ -1,19 +1,21 @@ | ||
package tech.jhipster.lite.generator.server.springboot.database.mssql.application; | ||
|
||
import org.springframework.stereotype.Service; | ||
import tech.jhipster.lite.generator.project.domain.Project; | ||
import tech.jhipster.lite.generator.server.springboot.database.mssql.domain.MssqlService; | ||
import tech.jhipster.lite.docker.domain.DockerImages; | ||
import tech.jhipster.lite.generator.server.springboot.database.mssql.domain.MsSQLModuleFactory; | ||
import tech.jhipster.lite.module.domain.JHipsterModule; | ||
import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties; | ||
|
||
@Service | ||
public class MssqlApplicationService { | ||
public class MsSQLApplicationService { | ||
|
||
private final MssqlService mssqlService; | ||
private final MsSQLModuleFactory factory; | ||
|
||
public MssqlApplicationService(MssqlService mssqlService) { | ||
this.mssqlService = mssqlService; | ||
public MsSQLApplicationService(DockerImages dockerImages) { | ||
factory = new MsSQLModuleFactory(dockerImages); | ||
} | ||
|
||
public void init(Project project) { | ||
mssqlService.init(project); | ||
public JHipsterModule build(JHipsterModuleProperties properties) { | ||
return factory.buildModule(properties); | ||
} | ||
} |
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,54 @@ | ||
Feature: mssql module | ||
|
||
Scenario: Should add MsSQL elements using legacy url | ||
When I apply legacy modules to default project | ||
| /api/build-tools/maven | | ||
| /api/servers/spring-boot | | ||
| /api/servers/spring-boot/databases/mssql | | ||
Then I should have files in "" | ||
| pom.xml | | ||
And I should have history entry for "mssql" | ||
And I should have files in "documentation" | ||
| mssql.md | | ||
And I should have files in "src/main/docker" | ||
| mssql.yml | | ||
And I should have files in "src/main/java/tech/jhipster/chips/technical/infrastructure/secondary/mssql" | ||
| DatabaseConfiguration.java | | ||
And I should have files in "src/test/java/tech/jhipster/chips/technical/infrastructure/secondary/mssql" | ||
| MsSQLTestContainerExtension.java | | ||
And I should have files in "src/test/resources" | ||
| container-license-acceptance.txt | | ||
And I should have files in "src/main/resources/config" | ||
| application.properties | | ||
And I should have files in "src/test/resources/config" | ||
| application.properties | | ||
|
||
Scenario: Should get MsSQL module properties definition | ||
When I get module "mssql" properties definition | ||
Then I should have properties definitions | ||
| Key | Type | Mandatory | | ||
| packageName | STRING | true | | ||
| baseName | STRING | true | | ||
| prettierDefaultIndent | INTEGER | false | | ||
|
||
Scenario: Should add MsSQL elements using module url | ||
When I apply "mssql" module to default project with maven file | ||
| packageName | tech.jhipster.chips | | ||
| baseName | jhipster | | ||
Then I should have files in "" | ||
| pom.xml | | ||
And I should have history entry for "mssql" | ||
And I should have files in "documentation" | ||
| mssql.md | | ||
And I should have files in "src/main/docker" | ||
| mssql.yml | | ||
And I should have files in "src/main/java/tech/jhipster/chips/technical/infrastructure/secondary/mssql" | ||
| DatabaseConfiguration.java | | ||
And I should have files in "src/test/java/tech/jhipster/chips/technical/infrastructure/secondary/mssql" | ||
| MsSQLTestContainerExtension.java | | ||
And I should have files in "src/test/resources" | ||
| container-license-acceptance.txt | | ||
And I should have files in "src/main/resources/config" | ||
| application.properties | | ||
And I should have files in "src/test/resources/config" | ||
| application.properties | |