@@ -0,0 +1,2783 @@
+/*%0A * Copyright 2020, TeamDev. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage io.spine.query;%0A%0Aimport com.google.common.testing.NullPointerTester;%0Aimport com.google.protobuf.Descriptors;%0Aimport io.spine.code.proto.FieldDeclaration;%0Aimport io.spine.test.code.proto.CoProject;%0Aimport org.junit.jupiter.api.DisplayName;%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport static com.google.common.truth.Truth.assertThat;%0Aimport static io.spine.testing.DisplayNames.NOT_ACCEPT_NULLS;%0Aimport static org.junit.jupiter.api.Assertions.assertThrows;%0A%0A@DisplayName(%22%60ColumnName%60 should%22)%0Aclass ColumnNameTest %7B%0A%0A    @Test%0A    @DisplayName(NOT_ACCEPT_NULLS)%0A    void passNullToleranceCheck() %7B%0A        new NullPointerTester()%0A                .testAllPublicStaticMethods(ColumnName.class);%0A    %7D%0A%0A    @Test%0A    @DisplayName(%22be constructed from string value%22)%0A    void initFromString() %7B%0A        String columnName = %22the-column-name%22;%0A        ColumnName name = ColumnName.of(columnName);%0A%0A        assertThat(name.value()).isEqualTo(columnName);%0A    %7D%0A%0A    @SuppressWarnings(%7B%22CheckReturnValue%22, %22ResultOfMethodCallIgnored%22%7D)%0A    // Called to throw exception.%0A    @Test%0A    @DisplayName(%22not be constructed from empty string%22)%0A    void notInitFromEmpty() %7B%0A        assertThrows(IllegalArgumentException.class, () -%3E ColumnName.of(%22%22));%0A    %7D%0A%0A    @Test%0A    @DisplayName(%22be constructed from %60FieldDeclaration%60%22)%0A    void initFromFieldDeclaration() %7B%0A        Descriptors.FieldDescriptor field = CoProject.getDescriptor()%0A                                                     .getFields()%0A                                                     .get(0);%0A        FieldDeclaration fieldDeclaration = new FieldDeclaration(field);%0A        ColumnName columnName = ColumnName.of(fieldDeclaration);%0A%0A        assertThat(columnName.value()).isEqualTo(field.getName());%0A    %7D%0A%7D%0A

Test `ColumnName`.