Added metadatatest
1 unresolved thread
1 unresolved thread
I choose to not test getOrCreateMetadata method as this method is not used and should be removed. These repository tests are not thorough as the all use the same abstract class and has few individual methods.
Merge request reports
Activity
60 metadataRepository.save(new Metadata()); 61 metadataRepository.save(new Metadata()); 62 63 List<Metadata> foundMetadata = metadataRepository.findAll(); 64 assertEquals(2, foundMetadata.size()); 65 } 66 67 /** 68 * Test that save a metadata and finds the metadata by id 69 */ 70 @Test 71 void testFindByIdReturnsOptionalWithEntityWithId() { 72 metadataRepository.save(new Metadata()); 73 Optional<Metadata> foundMetadata = metadataRepository.findById(INITIAL_ID); 74 assertTrue(foundMetadata.isPresent()); 75 assertEquals(INITIAL_ID, foundMetadata.get().getMetadataId()); mentioned in commit 7e54d855
Please register or sign in to reply