@Test @UsingDataSet({"profile.yml"}) @ShouldMatchDataSet( value = {"profile.yml"}, excludeColumns = {"id"}) public void findByUsername_ExistingProfile_Found() throws Exception { Profile profile = profileRepository.findByUsername("test_user"); Assert.assertNotNull(profile); }
@Test @UsingDataSet({"profile.yml"}) public void findByUsername_InvalidUsername_NoProfileFound() throws Exception { Profile profile = profileRepository.findByUsername("invalid_user"); Assert.assertNull(profile); }