Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 3 additions & 18 deletions sweater-FileUpload/pom.xml → pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,29 +87,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.194</version>
<scope>test</scope>
</dependency>


</dependencies>


Expand All @@ -118,7 +104,6 @@
<java.version>1.8</java.version>
</properties>


<build>
<plugins>
<plugin>
Expand Down
13 changes: 13 additions & 0 deletions src/main/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
spring.profiles.active: test

spring:
jpa:
database: h2
hibernate:
ddl-auto: create
datasource:
url: jdbc:h2:mem:AZ
driver-class-name: org.h2.Driver
h2:
console:
enabled: true
31 changes: 31 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
mail:
debug: true
properties:
mail:
smtp:
auth: true
smtp:
starttls:
enable: true
recaptcha:
secret: 6LduL7cUAAAAAE46ZeC_04ibNMZqGypgkjeeLYBT
spring:
datasource:
password: 770
url: jdbc:mysql://localhost:3306/sweater?useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&useSSL=false
username: root
jpa:
generate-ddl: false
hibernate:
ddl-auto: validate
show-sql: false
mail:
host: smtp.gmail.com
password: Waweqtt541
port: 587
protocol: smtp
username: oleksandr.kaplin@nure.ua
mustache:
expose-request-attributes: true
upload:
path: C:/Users/oleks/Documents/GitHub/sweater/sweater-FileUpload/uploads
34 changes: 34 additions & 0 deletions src/test/java/com/example/sweater/MockMvcExampleTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.example.sweater;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;

import static org.assertj.core.api.Assertions.assertThat;

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("test")
public class MockMvcExampleTests {

@LocalServerPort
private int port;

@Autowired
private TestRestTemplate restTemplate;

@Test
public void contextLoads() throws Exception {
}

@Test
public void greetingShouldReturnDefaultMessage() throws Exception {
assertThat(this.restTemplate.getForObject("http://localhost:" + port + "/",
String.class)).contains("Hello World");
}
}
20 changes: 0 additions & 20 deletions sweater-FileUpload/src/main/resources/application.properties

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions sweater-FileUpload/target/classes/application.properties

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
29 changes: 0 additions & 29 deletions sweater-FileUpload/target/classes/db/migration/V1__Init_DB.sql

This file was deleted.

3 changes: 0 additions & 3 deletions sweater-FileUpload/target/classes/static/style.css

This file was deleted.

5 changes: 0 additions & 5 deletions sweater-FileUpload/target/classes/templates/greeting.ftl

This file was deleted.

16 changes: 0 additions & 16 deletions sweater-FileUpload/target/classes/templates/login.ftl

This file was deleted.

66 changes: 0 additions & 66 deletions sweater-FileUpload/target/classes/templates/main.ftl

This file was deleted.

Loading