@@ -0,0 +1,2970 @@
+/*%0A * Copyright 2019, 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.validate.option;%0A%0Aimport com.google.protobuf.util.Timestamps;%0Aimport io.spine.test.validate.Payment;%0Aimport io.spine.test.validate.PaymentId;%0Aimport io.spine.validate.MessageValidatorTest;%0Aimport org.junit.jupiter.api.Disabled;%0Aimport org.junit.jupiter.api.DisplayName;%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport static io.spine.base.Identifier.newUuid;%0Aimport static io.spine.validate.MessageValidatorTest.MESSAGE_VALIDATOR_SHOULD;%0A%0A@DisplayName(MESSAGE_VALIDATOR_SHOULD + %22analyze (goes) option and%22)%0Afinal class GoesTest extends MessageValidatorTest %7B%0A%0A    @DisplayName(%22(goes).with fields are both optional%22)%0A    @Test%0A    void findOutThatGoesWithFieldsAreBothOptional() %7B%0A        Payment msg = Payment%0A                .newBuilder()%0A                .setDescription(%22Scheduled payment%22)%0A                .build();%0A        assertValid(msg);%0A    %7D%0A%0A    @Disabled%0A    @DisplayName(%22(goes).with fields should be filled simultaneously%22)%0A    @Test%0A    void findOutThatGoesWithFieldsShouldBeFilledSimultaneously() %7B%0A        PaymentId id = PaymentId%0A                .newBuilder()%0A                .setUuid(newUuid())%0A                .build();%0A        Payment withId = Payment%0A                .newBuilder()%0A                .setId(id)%0A                .build();%0A        assertNotValid(withId);%0A%0A        Payment withTimestamp = Payment%0A                .newBuilder()%0A                .setTimestamp(Timestamps.MAX_VALUE)%0A                .build();%0A        assertNotValid(withTimestamp);%0A    %7D%0A%0A    @DisplayName(%22(goes).with fields are filled simultaneously%22)%0A    @Test%0A    void findOutThatGoesWithFieldsAreFilledSimultaneously() %7B%0A        PaymentId id = PaymentId%0A                .newBuilder()%0A                .setUuid(newUuid())%0A                .build();%0A        Payment msg = Payment%0A                .newBuilder()%0A                .setId(id)%0A                .setTimestamp(Timestamps.MAX_VALUE)%0A                .build();%0A        assertValid(msg);%0A    %7D%0A%7D%0A

Add Goes option test