Working wersion
This commit is contained in:
1 parent
8e400c933e
commit
5170130e02
8 files changed
+48
-20
No files matched your search
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"java.compile.nullAnalysis.mode": "automatic",
|
||||
"java.configuration.updateBuildConfiguration": "automatic"
|
||||
}
|
||||
@@ -41,25 +41,13 @@
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<version>5.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.22</version>
|
||||
<version>1.18.24</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -91,4 +79,29 @@
|
||||
<url>https://maven.mangoautomation.net/repository/ias-release/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M7</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.10.1</version>
|
||||
<configuration>
|
||||
<release>11</release>
|
||||
<source>11</source>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.24</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
+5
-2
@@ -2,16 +2,19 @@ package home.automation.configuration;
|
||||
|
||||
import home.automation.influxdb.InfluxConnection;
|
||||
import org.influxdb.InfluxDB;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
public class InfluxConnectionTest {
|
||||
public class InfluxConnectionTests {
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
public void givenConfigurationWhenInfluxPingThenConnectionIsAstablished() throws UnknownHostException {
|
||||
final InfluxDBConfiguration connection = new InfluxDBConfiguration();
|
||||
final InetAddress byName = InetAddress.getByName("https://influxdb.mariuszpacek.pl");
|
||||
final InetAddress byName = InetAddress.getByName("influxdb.mariuszpacek.pl");
|
||||
connection.setAddress(byName.getHostName());
|
||||
final InfluxDB db = new InfluxConnection(connection).getConnection();
|
||||
assert (db.ping().isGood());
|
||||
+1
-1
@@ -4,7 +4,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
class JsonFileBasedConfigurationTest {
|
||||
class JsonFileBasedConfigurationTests {
|
||||
|
||||
@Test
|
||||
public void GivenFileConfigurationStrategy_When_getConfig_Then_MappedClassShoudlBeCreated() {
|
||||
+1
-1
@@ -9,7 +9,7 @@ import static java.lang.Thread.sleep;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
|
||||
class ModbusCachedWrapperTest {
|
||||
class ModbusCachedWrapperTests {
|
||||
|
||||
public static final int MAX_TESTS = 10;
|
||||
private final RepositoryInMemory repository = new RepositoryInMemory();
|
||||
+1
-1
@@ -20,7 +20,7 @@ import static org.mockito.Mockito.when;
|
||||
|
||||
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class ModbusRtuTcpRepositoryTest {
|
||||
class ModbusRtuTcpRepositoryTests {
|
||||
|
||||
private ModbusRtuTcpRepository repository;
|
||||
@Mock
|
||||
+1
-1
@@ -8,7 +8,7 @@ import java.util.Objects;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class ModbusServiceTest {
|
||||
public class ModbusServiceTests {
|
||||
|
||||
@Test
|
||||
public void givenRegistryWhenGetRegistryThenValueFromRepositoryIsReturned(){
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": ".."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
Reference in new issue
Block a user