diff --git a/backend/src/test/kotlin/uk/co/neviyn/observationdatabase/RepositoryTest.kt b/backend/src/test/kotlin/uk/co/neviyn/observationdatabase/RepositoryTest.kt index 8b60795..a6ab27c 100644 --- a/backend/src/test/kotlin/uk/co/neviyn/observationdatabase/RepositoryTest.kt +++ b/backend/src/test/kotlin/uk/co/neviyn/observationdatabase/RepositoryTest.kt @@ -332,12 +332,26 @@ class RepositoryTest { val site = entityManager.persist(Site(name = "X")) val tutor = entityManager.persist(Tutor(name = "Foo Bar", site = site)) val person = "Mr X" - val testString = "teststring".repeat(100) - val scenario = entityManager.persist(Scenario(0, "Something", 5, testString, "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "")) + val testString = "teststring".repeat(500) + val scenario = entityManager.persist(Scenario(0, "Something", 5, testString, testString, 5, testString, testString, 5, testString, testString, 5, testString, testString, 5, testString, testString, 5, testString, testString, 5, testString, testString, 5, testString, testString)) val scenarios = listOf(scenario) val observation = Observation(0, site, LocalDate.now(), TrainingType.INITIAL, "An Observation", 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, scenarios, setOf(tutor), person) val result = entityManager.persist(observation) - assertEquals(1, result.id) - assertEquals(testString, observation.scenarios.first().monitoringStrengths) + assertEquals(testString, result.scenarios.first().monitoringStrengths) + assertEquals(testString, result.scenarios.first().monitoringImprovements) + assertEquals(testString, result.scenarios.first().controlProceduralStrengths) + assertEquals(testString, result.scenarios.first().controlProceduralImprovements) + assertEquals(testString, result.scenarios.first().controlStrengths) + assertEquals(testString, result.scenarios.first().controlImprovements) + assertEquals(testString, result.scenarios.first().conservatismStrengths) + assertEquals(testString, result.scenarios.first().conservatismImprovements) + assertEquals(testString, result.scenarios.first().teamworkCommunicationsStrengths) + assertEquals(testString, result.scenarios.first().teamworkCommunicationsImprovements) + assertEquals(testString, result.scenarios.first().teamworkLeadershipStrengths) + assertEquals(testString, result.scenarios.first().teamworkLeadershipImprovements) + assertEquals(testString, result.scenarios.first().teamworkWorkloadStrengths) + assertEquals(testString, result.scenarios.first().teamworkWorkloadImprovements) + assertEquals(testString, result.scenarios.first().knowledgeStrengths) + assertEquals(testString, result.scenarios.first().knowledgeImprovements) } }