Files
ArtisanConnectBackend/src/test/java/_11/asktpk/artisanconnectbackend/ArtisanConnectBackendApplicationTests.java
Andrii Solianyk 4c6d3f9452 Bulk add of notices working.
A basic functionality with DTO implemented

TO-DO: zamiast dodawać tutaj pętlą, musi to robić NoticeService, trzeba zaimplementować odpowienią metodę
2025-04-09 15:57:56 +02:00

34 lines
1.2 KiB
Java

package _11.asktpk.artisanconnectbackend;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ArtisanConnectBackendApplicationTests {
private static final Logger logger = LogManager.getLogger(ArtisanConnectBackendApplicationTests.class);
// @Test
// void testPostgresDatabase() {
// postgresDatabase.add(new Notice("Test Notice", "Username", "Test Description"));
// Boolean isRecordAvailable = postgresDatabase.get().size() > 0;
// if(isRecordAvailable) {
// logger.info("The record is available in the database");
// } else {
// logger.error("The record is not available in the database");
// }
// assert isRecordAvailable;
// }
//
// @Test
// void getAllNotices() throws IOException {
// OkHttpClient client = new OkHttpClient().newBuilder()
// .build();
// MediaType mediaType = MediaType.parse("text/plain");
// Request request = new Request.Builder()
// .url("http://localhost:8080/api/v1/notices/all")
// .build();
// Response response = client.newCall(request).execute();
// }
}