mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#3031 Improve error message
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user