Skip to content

Commit

Permalink
#177 test: 미션 오브젝트 개수 테스트, 아바타 대사 개수 테스트 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hye-on committed Oct 22, 2024
1 parent 4c763bf commit b6bbc5e
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static org.assertj.core.api.Assertions.assertThat;

import com.wakeUpTogetUp.togetUp.config.AbstractRepositoryTestContainers;
import javax.persistence.Query;
import org.junit.jupiter.api.Test;


Expand All @@ -13,4 +14,20 @@ void testConnection() {
assertThat(entityManager).isNotNull();
}

@Test
void testMissionObjectTableRowCount() {

Query query = entityManager.createNativeQuery("SELECT COUNT(*) FROM mission_object");
Long count = ((Number) query.getSingleResult()).longValue();

assertThat(count).isEqualTo(69);
}

@Test
void testAvatarSpeechTableRowCount() {
Query query = entityManager.createNativeQuery("SELECT COUNT(*) FROM avatar_speech");
Long count = ((Number) query.getSingleResult()).longValue();

assertThat(count).isEqualTo(84);
}
}

0 comments on commit b6bbc5e

Please sign in to comment.