diff --git a/test/ru/javawebinar/basejava/storage/AbstractArrayStorageTest.java b/test/ru/javawebinar/basejava/storage/AbstractArrayStorageTest.java index a3ce7693..34cdd838 100644 --- a/test/ru/javawebinar/basejava/storage/AbstractArrayStorageTest.java +++ b/test/ru/javawebinar/basejava/storage/AbstractArrayStorageTest.java @@ -41,6 +41,12 @@ public void update() throws Exception { Assertions.assertSame(newResume, storage.get(UUID_1)); } + @Test + public void updateNotExist() throws Exception { + Assertions.assertThrows(NotExistStorageException.class, + () -> storage.get("dummy")); + } + @Test public void size() throws Exception { assertSize(3); @@ -53,33 +59,6 @@ public void save() throws Exception { assertGet(RESUME_4); } - @Test - public void delete() throws Exception { - storage.delete(UUID_1); - assertSize(2); - Assertions.assertThrows(NotExistStorageException.class, - () -> storage.delete(UUID_1)); - } - - @Test - public void get() throws Exception { - assertGet(RESUME_1); - assertGet(RESUME_2); - assertGet(RESUME_3); - } - - @Test - public void getNotExist() throws Exception { - Assertions.assertThrows(NotExistStorageException.class, - () -> storage.get("dummy")); - } - - @Test - public void deleteNotExist() throws Exception { - Assertions.assertThrows(NotExistStorageException.class, - () -> storage.delete("dummy")); - } - @Test public void saveExist() throws Exception { Assertions.assertThrows(ExistStorageException.class, @@ -100,7 +79,28 @@ public void saveOverflow() throws Exception { } @Test - public void updateNotExist() throws Exception { + public void delete() throws Exception { + storage.delete(UUID_1); + assertSize(2); + Assertions.assertThrows(NotExistStorageException.class, + () -> storage.delete(UUID_1)); + } + + @Test + public void deleteNotExist() throws Exception { + Assertions.assertThrows(NotExistStorageException.class, + () -> storage.delete("dummy")); + } + + @Test + public void get() throws Exception { + assertGet(RESUME_1); + assertGet(RESUME_2); + assertGet(RESUME_3); + } + + @Test + public void getNotExist() throws Exception { Assertions.assertThrows(NotExistStorageException.class, () -> storage.get("dummy")); }