// Path: src/test/java/jigspuzzle/cucumber/steps/util/ColorSteps.java
// public class ColorSteps {
// 
//     public ColorSteps() {
//     }
// 
//     public static Color getColorFromString(String color) throws NoSuchMethodException {
//         switch (color) {
//             case "red":
//                 return Color.RED;
//             case "blue":
//                 return Color.BLUE;
//             case "yellow":
//                 return Color.YELLOW;
//         }
//         throw new NoSuchMethodException("The color " + color + " is not supported in the tests. Please add it to " + ColorSteps.class.getSimpleName());
//     }
// }


import cucumber.api.PendingException;
import cucumber.api.java.en.*;
import java.awt.Color;
import java.awt.Component;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import jigspuzzle.cucumber.steps.util.ColorSteps;
import static org.assertj.core.api.Assertions.*;
import org.assertj.swing.fixture.FrameFixture;
package jigspuzzle.cucumber.steps;


/**
 * Step definitions for handeling the in- and output for the puzzlearea settings
 * window.
 *
 * @author RoseTec
 */
public class PuzzleareaSteps {

    private final WindowsSteps windowsSteps;

    public PuzzleareaSteps(WindowsSteps windowsSteps) {
        this.windowsSteps = windowsSteps;
    }

    // color of puzzle area
    @Then("^the background color of the puzzlearea should( not)? be \"([^\"]*)\"$")
    public void background_color_puzzlearea_should_be(String negation, String colorString) throws NoSuchMethodException {
// Path: src/test/java/jigspuzzle/cucumber/steps/util/ColorSteps.java
// public class ColorSteps {
// 
//     public ColorSteps() {
//     }
// 
//     public static Color getColorFromString(String color) throws NoSuchMethodException {
//         switch (color) {
//             case "red":
//                 return Color.RED;
//             case "blue":
//                 return Color.BLUE;
//             case "yellow":
//                 return Color.YELLOW;
//         }
//         throw new NoSuchMethodException("The color " + color + " is not supported in the tests. Please add it to " + ColorSteps.class.getSimpleName());
//     }
// }


// Path: src/test/java/jigspuzzle/cucumber/steps/PuzzleareaSteps.java
import cucumber.api.PendingException;
import cucumber.api.java.en.*;
import java.awt.Color;
import java.awt.Component;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import jigspuzzle.cucumber.steps.util.ColorSteps;
import static org.assertj.core.api.Assertions.*;
import org.assertj.swing.fixture.FrameFixture;

package jigspuzzle.cucumber.steps;


/**
 * Step definitions for handeling the in- and output for the puzzlearea settings
 * window.
 *
 * @author RoseTec
 */
public class PuzzleareaSteps {

    private final WindowsSteps windowsSteps;

    public PuzzleareaSteps(WindowsSteps windowsSteps) {
        this.windowsSteps = windowsSteps;
    }

    // color of puzzle area
    @Then("^the background color of the puzzlearea should( not)? be \"([^\"]*)\"$")
    public void background_color_puzzlearea_should_be(String negation, String colorString) throws NoSuchMethodException {
        Color colorExpected = ColorSteps.getColorFromString(colorString);