A basic structure of DB (WIP)
This commit is contained in:
@@ -18,26 +18,26 @@ class ArtisanConnectBackendApplicationTests {
|
||||
@Autowired
|
||||
PostgresDatabase postgresDatabase;
|
||||
|
||||
@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();
|
||||
}
|
||||
// @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();
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user