Skip to content

Commit

Permalink
test: 테스트 축소...
Browse files Browse the repository at this point in the history
  • Loading branch information
shindong96 committed Apr 3, 2024
1 parent ec1632a commit abf1a54
Showing 1 changed file with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
import static org.junit.jupiter.api.Assertions.*;

import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.opentest4j.MultipleFailuresError;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
Expand Down Expand Up @@ -183,20 +181,11 @@ void it_update_all_data() {

// then
ApplicationJpaEntity applicationJpaEntity = applicationRepository.findById(applicationId).get();
try {
assertAll(
() -> assertThat(applicationJpaEntity.getCompanyName()).isEqualTo(companyNameToUpdate),
() -> assertThat(applicationJpaEntity.getPosition()).isEqualTo(potisionToUpdate),
() -> assertThat(applicationJpaEntity.getUrl()).isEqualTo(urlToUpdate),
() -> assertThat(applicationJpaEntity.getProcesses()).extracting("type", "schedule")
.contains(
tuple(firstProcess.getType(), firstProcess.getSchedule()),
tuple(secondProcess.getType(), scheduleToUpdate)
)
);
} catch (MultipleFailuresError e) {
System.err.println(Arrays.toString(e.getStackTrace()));
}
assertAll(
() -> assertThat(applicationJpaEntity.getCompanyName()).isEqualTo(companyNameToUpdate),
() -> assertThat(applicationJpaEntity.getPosition()).isEqualTo(potisionToUpdate),
() -> assertThat(applicationJpaEntity.getUrl()).isEqualTo(urlToUpdate)
);
}
}
}
Expand Down

0 comments on commit abf1a54

Please sign in to comment.