package picocli;

import org.junit.Test;
import picocli.CommandLine.Help.ColorScheme;

import static org.junit.Assert.*;

public class ColorSchemeTest {
    @Test
    public void testEquals() {
        ColorScheme defaultScheme = CommandLine.Help.defaultColorScheme(CommandLine.Help.Ansi.AUTO);
        ColorScheme expect = new ColorScheme.Builder()
                .commands(CommandLine.Help.Ansi.Style.bold)
                .options(CommandLine.Help.Ansi.Style.fg_yellow)
                .parameters(CommandLine.Help.Ansi.Style.fg_yellow)
                .optionParams(CommandLine.Help.Ansi.Style.italic).build();
        assertEquals(expect, defaultScheme);
    }

    @Test
    public void testHashCode() {
        ColorScheme defaultScheme = CommandLine.Help.defaultColorScheme(CommandLine.Help.Ansi.AUTO);
        ColorScheme expect = new ColorScheme.Builder()
                .commands(CommandLine.Help.Ansi.Style.bold)
                .options(CommandLine.Help.Ansi.Style.fg_yellow)
                .parameters(CommandLine.Help.Ansi.Style.fg_yellow)
                .optionParams(CommandLine.Help.Ansi.Style.italic).build();
        assertEquals(expect.hashCode(), defaultScheme.hashCode());
    }
}

@@ -661,16 +661,218 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testEqualsOther() %7B%0A        ColorScheme defaultScheme = CommandLine.Help.defaultColorScheme(CommandLine.Help.Ansi.AUTO);%0A        assertNotEquals(%22blah%22, defaultScheme);%0A    %7D%0A%0A
     @Tes
@@ -1400,11 +1400,336 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void testToString() %7B%0A        ColorScheme defaultScheme = CommandLine.Help.defaultColorScheme(CommandLine.Help.Ansi.AUTO);%0A        assertEquals(%22ColorScheme%5Bansi=AUTO, commands=%5Bbold%5D, optionStyles=%5Bfg_yellow%5D, parameterStyles=%5Bfg_yellow%5D, optionParamStyles=%5Bitalic%5D%5D%22, defaultScheme.toString());%0A    %7D
 %0A%7D%0A

TEST ColorSchemeTest toString, equals