restructres code into a more sensible path structure
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
package com.stktrk.app;
|
||||
|
||||
import jakarta.annotation.Nonnull;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
|
||||
public class TestAppApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
public static void main(@Nonnull String[] args) {
|
||||
SpringApplication.from(AppApplication::main).with(TestcontainersConfiguration.class).run(args);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.stktrk.app;
|
||||
|
||||
import jakarta.annotation.Nonnull;
|
||||
import org.springframework.boot.test.context.TestConfiguration;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -11,6 +12,7 @@ class TestcontainersConfiguration {
|
||||
|
||||
@Bean
|
||||
@ServiceConnection
|
||||
@Nonnull
|
||||
RabbitMQContainer rabbitContainer() {
|
||||
return new RabbitMQContainer(DockerImageName.parse("rabbitmq:latest"));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.stktrk.app.utils;
|
||||
|
||||
import com.arcadedb.database.RID;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.security.InvalidKeyException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
class EncryptIdTest {
|
||||
|
||||
|
||||
@Test
|
||||
void encrypt() {
|
||||
Assertions.assertEquals("nOua", EncryptId.encrypt(new RID(1,2L)));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
void decrypt() throws InvalidKeyException {
|
||||
Assertions.assertEquals(new RID(1,2L), EncryptId.decrypt("nOua"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user