diff options
| author | Kevin Hoerr <kjhoerr@noreply.cybr.es> | 2022-08-06 01:44:00 +0000 |
|---|---|---|
| committer | Kevin Hoerr <kjhoerr@noreply.cybr.es> | 2022-08-06 01:44:00 +0000 |
| commit | 461b1fa053bcc86d06156574ab59fa7000dbf69e (patch) | |
| tree | 6e0080d057b5015bd92c843481cf45575af462a8 /src/test/java/dev | |
| parent | cdf65b32202746eaffd9e58bf951d1995ab03be3 (diff) | |
| download | pantry-461b1fa053bcc86d06156574ab59fa7000dbf69e.tar.gz pantry-461b1fa053bcc86d06156574ab59fa7000dbf69e.tar.bz2 pantry-461b1fa053bcc86d06156574ab59fa7000dbf69e.zip | |
Quarkus (#2)
Reviewed-on: https://git.submelon.dev/kjhoerr/pantry/pulls/2
Diffstat (limited to 'src/test/java/dev')
| -rw-r--r-- | src/test/java/dev/submelon/pantry/ItemRepositoryTests.java | 51 | ||||
| -rw-r--r-- | src/test/java/dev/submelon/pantry/PantryApplicationTests.java | 13 |
2 files changed, 0 insertions, 64 deletions
diff --git a/src/test/java/dev/submelon/pantry/ItemRepositoryTests.java b/src/test/java/dev/submelon/pantry/ItemRepositoryTests.java deleted file mode 100644 index 1f890d8..0000000 --- a/src/test/java/dev/submelon/pantry/ItemRepositoryTests.java +++ /dev/null @@ -1,51 +0,0 @@ -package dev.submelon.pantry; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestInstance; -import org.junit.jupiter.api.TestInstance.Lifecycle; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; - -@TestInstance(Lifecycle.PER_CLASS) -@SpringBootTest -public class ItemRepositoryTests { - @Autowired - private PantryItemRepository itemRepository; - - @BeforeAll - public void before() throws Exception { - PantryItem pb = new PantryItem("Peanut Butter", "Crunchy", 14.0, "oz"); - PantryItem jelly = new PantryItem("Strawberry Preserves", "The best", 12.8, "oz"); - PantryItem bread = new PantryItem("Oatnut Bread", "Relatively healthy, right?", 10, "slices"); - assertNull(pb.getId()); - assertNull(jelly.getId()); - assertNull(bread.getId()); - this.itemRepository.save(pb); - this.itemRepository.save(jelly); - this.itemRepository.save(bread); - assertNotNull(pb.getId()); - assertNotNull(jelly.getId()); - assertNotNull(bread.getId()); - } - - @Test - public void testFetchData() { - PantryItem pb = itemRepository.findByName("Peanut Butter").get(); - assertNotNull(pb); - assertEquals(14.0, pb.getQuantity()); - Iterable<PantryItem> items = itemRepository.findAll(); - - int count = 0; - for (PantryItem item : items) { - assertNotNull(item); - count++; - } - - assertEquals(3, count); - } -} diff --git a/src/test/java/dev/submelon/pantry/PantryApplicationTests.java b/src/test/java/dev/submelon/pantry/PantryApplicationTests.java deleted file mode 100644 index ec72d58..0000000 --- a/src/test/java/dev/submelon/pantry/PantryApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package dev.submelon.pantry; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class PantryApplicationTests { - - @Test - void contextLoads() { - } - -} |
