/*
 * Copyright 2018, TeamDev. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package io.spine.testing.logging;

import io.spine.testing.UtilityClassTest;
import org.junit.jupiter.api.DisplayName;

import static org.junit.jupiter.api.Assertions.*;

/**
 * @author Alexander Yevsyukov
 */
@DisplayName("LogTruth should")
class LogTruthTest extends UtilityClassTest<LogTruth> {

    LogTruthTest() {
        super(LogTruth.class);
    }
}

@@ -1083,16 +1083,57 @@
 ssTest;%0A
+import org.junit.jupiter.api.BeforeEach;%0A
 import o
@@ -1170,239 +1170,1541 @@
 me;%0A
-%0A
 import 
-static org.junit.jupiter.api.Assertions.*;%0A%0A/**%0A * @author Alexander Yevsyukov%0A */%0A@DisplayName(%22LogTruth should%22)%0Aclass LogTruthTest extends UtilityClassTest%3CLogTruth%3E %7B%0A%0A    LogTruthTest() %7B%0A        super(LogTruth.class);
+org.junit.jupiter.api.Nested;%0Aimport org.junit.jupiter.api.Test;%0Aimport org.slf4j.event.Level;%0Aimport org.slf4j.event.SubstituteLoggingEvent;%0A%0Aimport static io.spine.testing.logging.LogTruth.assertThat;%0A%0A/**%0A * @author Alexander Yevsyukov%0A */%0A@DisplayName(%22LogTruth should%22)%0Aclass LogTruthTest extends UtilityClassTest%3CLogTruth%3E %7B%0A%0A    LogTruthTest() %7B%0A        super(LogTruth.class);%0A    %7D%0A%0A    @Test%0A    void eventSubject() %7B%0A        SubstituteLoggingEvent event = new SubstituteLoggingEvent();%0A        LogEventSubject assertThat = assertThat(event);%0A        assertThat.isNotNull();%0A    %7D%0A%0A    @Nested%0A    @DisplayName(%22provide Subject for log event with%22)%0A    class SubjectForLogEvent %7B%0A%0A        private SubstituteLoggingEvent event;%0A        private LogEventSubject subject;%0A%0A        @BeforeEach%0A        void setUp() %7B%0A            event = new SubstituteLoggingEvent();%0A            event.setLevel(Level.DEBUG);%0A            event.setMessage(%22Testing subject of logging event%22);%0A            event.setArgumentArray(new String%5B%5D %7B %22arg1%22, %22arg2%22, %22arg3%22 %7D);%0A%0A            subject = assertThat(event);%0A        %7D%0A%0A        @Test%0A        void isNotNull() %7B%0A            subject.isNotNull();%0A        %7D%0A%0A        @Test%0A        void hasMessageThat() %7B%0A            subject.hasMessageThat()%0A                   .isEqualTo(event.getMessage());%0A        %7D%0A%0A        @Test%0A        void hasArgumentsThat() %7B%0A            subject.hasArgumentsThat()%0A                   .asList()%0A                   .containsExactly(event.getArgumentArray());%0A        %7D
 %0A   

Test log event subject