generator.server.javatool.base.test.error.NullElementInCollectionExceptionTest.mustache Maven / Gradle / Ivy
package {{packageName}}.shared.error.domain;
import static org.assertj.core.api.Assertions.*;
import org.junit.jupiter.api.Test;
import {{packageName}}.UnitTest;
@UnitTest
class NullElementInCollectionExceptionTest {
@Test
void shouldGetExceptionInformation() {
NullElementInCollectionException exception = new NullElementInCollectionException("myField");
assertThat(exception.type()).isEqualTo(AssertionErrorType.NULL_ELEMENT_IN_COLLECTION);
assertThat(exception.field()).isEqualTo("myField");
assertThat(exception.parameters()).isEmpty();
assertThat(exception.getMessage()).isEqualTo("The field \"myField\" contains a null element");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy