/**
 * The MIT License (MIT)
 *
 * Copyright (c) 2017 Yegor Bugayenko
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package org.cactoos.scalar;

import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;

/**
 * Test case for {@link Ternary}.
 *
 * @author Vseslav Sekorin (vssekorin@gmail.com)
 * @version $Id$
 * @since 0.8
 * @checkstyle JavadocMethodCheck (500 lines)
 * @checkstyle MagicNumberCheck (500 lines)
 */
public final class TernaryTest {

    @Test
    public void conditionTrue() throws Exception {
        MatcherAssert.assertThat(
            new Ternary<>(
                new True(),
                6,
                16
            ).value(),
            Matchers.equalTo(6)
        );
    }

    @Test
    public void conditionFalse() throws Exception {
        MatcherAssert.assertThat(
            new Ternary<>(
                new False(),
                6,
                16
            ).value(),
            Matchers.equalTo(16)
        );
    }
}

@@ -1299,19 +1299,16 @@
 rnary%7D.%0A
- *%0A
  * @auth
@@ -1348,16 +1348,63 @@
 il.com)%0A
+ * @author Mehmet Yildirim (memoyil@gmail.com)%0A
  * @vers
@@ -2077,11 +2077,590 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void conditionBoolean() throws Exception %7B%0A        MatcherAssert.assertThat(%0A            new Ternary%3C%3E(%0A                true,%0A                6,%0A                16%0A            ).value(),%0A            Matchers.equalTo(6)%0A        );%0A    %7D%0A%0A    @Test%0A    public void conditionFunc() throws Exception %7B%0A        MatcherAssert.assertThat(%0A            new Ternary%3C%3E(%0A                5,%0A                input -%3E input %3E 3,%0A                input -%3E input = 8,%0A                input -%3E input = 2%0A            ).value(),%0A            Matchers.equalTo(8)%0A        );%0A    %7D
 %0A%7D%0A

Add TernaryTestCases #392