mirror of
https://gitee.com/dcren/initializr.git
synced 2025-05-15 20:49:38 +08:00
Merge pull request #939 from wonwoo
* gh-939: Reduce visibility of test class and its methods Closes gh-939
This commit is contained in:
commit
66e871f2c9
@ -38,14 +38,14 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
|||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
* @author HaiTao Zhang
|
* @author HaiTao Zhang
|
||||||
*/
|
*/
|
||||||
public class ProjectRequestToDescriptionConverterTests {
|
class ProjectRequestToDescriptionConverterTests {
|
||||||
|
|
||||||
private InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults().build();
|
private InitializrMetadata metadata = InitializrMetadataTestBuilder.withDefaults().build();
|
||||||
|
|
||||||
private final ProjectRequestToDescriptionConverter converter = new ProjectRequestToDescriptionConverter();
|
private final ProjectRequestToDescriptionConverter converter = new ProjectRequestToDescriptionConverter();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void convertWhenTypeIsInvalidShouldThrowException() {
|
void convertWhenTypeIsInvalidShouldThrowException() {
|
||||||
ProjectRequest request = createProjectRequest();
|
ProjectRequest request = createProjectRequest();
|
||||||
request.setType("foo-build");
|
request.setType("foo-build");
|
||||||
assertThatExceptionOfType(InvalidProjectRequestException.class)
|
assertThatExceptionOfType(InvalidProjectRequestException.class)
|
||||||
@ -54,7 +54,7 @@ public class ProjectRequestToDescriptionConverterTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void convertWhenTypeDoesNotDefineBuildTagShouldThrowException() {
|
void convertWhenTypeDoesNotDefineBuildTagShouldThrowException() {
|
||||||
Type type = new Type();
|
Type type = new Type();
|
||||||
type.setId("example-project");
|
type.setId("example-project");
|
||||||
InitializrMetadata testMetadata = InitializrMetadataTestBuilder.withDefaults().addType(type).build();
|
InitializrMetadata testMetadata = InitializrMetadataTestBuilder.withDefaults().addType(type).build();
|
||||||
@ -75,7 +75,7 @@ public class ProjectRequestToDescriptionConverterTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void convertWhenPackagingIsInvalidShouldThrowException() {
|
void convertWhenPackagingIsInvalidShouldThrowException() {
|
||||||
ProjectRequest request = createProjectRequest();
|
ProjectRequest request = createProjectRequest();
|
||||||
request.setPackaging("star");
|
request.setPackaging("star");
|
||||||
assertThatExceptionOfType(InvalidProjectRequestException.class)
|
assertThatExceptionOfType(InvalidProjectRequestException.class)
|
||||||
@ -84,7 +84,7 @@ public class ProjectRequestToDescriptionConverterTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void convertWhenLanguageIsInvalidShouldThrowException() {
|
void convertWhenLanguageIsInvalidShouldThrowException() {
|
||||||
ProjectRequest request = createProjectRequest();
|
ProjectRequest request = createProjectRequest();
|
||||||
request.setLanguage("english");
|
request.setLanguage("english");
|
||||||
assertThatExceptionOfType(InvalidProjectRequestException.class)
|
assertThatExceptionOfType(InvalidProjectRequestException.class)
|
||||||
|
Loading…
Reference in New Issue
Block a user