#3031 Improve error message

This commit is contained in:
Rob Bygrave
2023-05-10 00:34:27 +12:00
parent e29b57811b
commit 06cad500c1
2 changed files with 6 additions and 6 deletions
@@ -57,7 +57,7 @@ public class DefaultTypeManagerTest {
assertThat(true).isFalse().as("never get here");
} catch (IllegalStateException e) {
assertThat(e.getMessage()).contains("It is mapped using 2 different modes when only one is supported");
assertThat(e.getMessage()).contains("It is mapped using 2 of (ORDINAL, STRING or an Ebean mapping) when only one is supported.");
}
}
@@ -72,7 +72,7 @@ public class DefaultTypeManagerTest {
typeManager.enumType(Month.class, EnumType.STRING);
assertThat(true).isFalse().as("never get here");
} catch (IllegalStateException e) {
assertThat(e.getMessage()).contains("It is mapped using 2 different modes when only one is supported");
assertThat(e.getMessage()).contains("It is mapped using 2 of (ORDINAL, STRING or an Ebean mapping) when only one is supported.");
}
}
@@ -90,7 +90,7 @@ public class DefaultTypeManagerTest {
typeManager.enumType(DayOfWeek.class, EnumType.ORDINAL);
assertThat(true).isFalse().as("never get here");
} catch (IllegalStateException e) {
assertThat(e.getMessage()).contains("It is mapped using 2 different modes when only one is supported");
assertThat(e.getMessage()).contains("It is mapped using 2 of (ORDINAL, STRING or an Ebean mapping) when only one is supported.");
}
}
@@ -105,7 +105,7 @@ public class DefaultTypeManagerTest {
typeManager.enumType(DayOfWeek.class, EnumType.STRING);
assertThat(true).isFalse().as("never get here");
} catch (IllegalStateException e) {
assertThat(e.getMessage()).contains("It is mapped using 2 different modes when only one is supported");
assertThat(e.getMessage()).contains("It is mapped using 2 of (ORDINAL, STRING or an Ebean mapping) when only one is supported.");
}
}
@@ -57,7 +57,7 @@ class TestTypeManager extends BaseTest {
typeManager.enumType(MyEnum.class, EnumType.STRING);
fail("never get here");
} catch (IllegalStateException e) {
assertThat(e.getMessage()).contains("It is mapped using 2 different modes when only one is supported");
assertThat(e.getMessage()).contains("It is mapped using 2 of (ORDINAL, STRING or an Ebean mapping) when only one is supported.");
}
}
@@ -91,7 +91,7 @@ class TestTypeManager extends BaseTest {
typeManager.enumType(MyDayOfWeek.class, EnumType.ORDINAL);
fail("never get here");
} catch (IllegalStateException e) {
assertThat(e.getMessage()).contains("It is mapped using 2 different modes when only one is supported");
assertThat(e.getMessage()).contains("It is mapped using 2 of (ORDINAL, STRING or an Ebean mapping) when only one is supported.");
}
}