// Path: approval-core/src/main/java/com/github/approval/Reporter.java
// public interface Reporter {
//     /**
//      * Called by an {@link com.github.approval.Approval} object when values don't match in the approval process.
//      *
//      * @param oldValue the old value that was found in fileForVerification from old runs
//      * @param newValue the new value that was passed for verification
//      * @param fileForVerification the file for this approval value
//      * @param fileForApproval the file for the new content
//      */
//     void notTheSame(byte[] oldValue, File fileForVerification, byte[] newValue, File fileForApproval);
// 
//     /**
//      * Called by an {@link com.github.approval.Approval} object when a value for verification is produced but no old.
//      *
//      * @param value the new value that came from the verification
//      * @param fileForApproval the approval file(this contains the value that was passed in)
//      * @param fileForVerification the file for the this new approval value  @return true if the new value is approved and false otherwise
//      */
//     void approveNew(byte[] value, File fileForApproval, File fileForVerification);
// 
//     /**
//      * A method to check if this reporter is supported for the following file type or environment! Reporters are
//      * different for different platforms and file types and this in conjuction with {@link
//      * com.github.approval.reporters.Reporters#firstWorking} will allow you to plug different reporters for different
//      * environments(CI, Windows, Linux, MacOS, etc).
//      *
//      * @param fileForApproval the file that we want to approve
//      * @return true if we can approve the file and false otherwise
//      */
//     boolean canApprove(File fileForApproval);
// }
// 
// Path: approval-core/src/test/java/com/github/approval/TestTempFile.java
// public class TestTempFile implements MethodRule {
//     private File file;
// 
//     public TestTempFile() {
// 
//     }
//     public File file() {
//         return file;
//     }
// 
//     public Path path() {
//         return file.toPath();
//     }
// 
//     @Override
//     public Statement apply(Statement statement, FrameworkMethod frameworkMethod, Object o) {
//         try {
//             this.file = File.createTempFile("unit.tests", null);
//             // we don't want this to be created but just want a temporary name
//             this.file.delete();
//         } catch (IOException e) {
//             throw new RuntimeException("Couldn't create a temporary file. You are out of disc space or something!?",e);
//         }
//         return statement;
//     }
// }
// 
// Path: approval-core/src/test/java/com/github/approval/TestUtils.java
// public class TestUtils {
//     public static final String VALUE = "some\nmultiline\nnsimple\nstring";
//     public static final byte[] RAW_VALUE = VALUE.getBytes(StandardCharsets.UTF_8);
// 
//     public static File forApproval(TestTempFile tmpTestFile) {
//         return Approval.getApprovalPath(tmpTestFile.file().toPath()).toFile();
//     }
// }
// 
// Path: approval-core/src/main/java/com/github/approval/utils/FileSystemUtils.java
// public interface FileSystemUtils {
//     /**
//      * Write the byte value to the specified path.
//      * @param path the path
//      * @param value the value
//      * @throws IOException if there was an error while writing the content
//      */
//     void write(Path path, byte[] value) throws IOException;
// 
//     /**
//      * Read the specified path as byte array.
//      * @param path the path to read
//      * @return the path content
//      * @throws IOException if there was an error while reading the content
//      */
//     byte[] readFully(Path path) throws IOException;
// 
//     /**
//      * Move a path to another path.
//      * @param path the source
//      * @param filePath the destination
//      * @throws IOException if there was an error while moving the paths
//      */
//     void move(Path path, Path filePath) throws IOException;
// 
//     /**
//      * Create a directory and their parent directories as needed.
//      *
//      * @param directory the directory to create
//      * @throws IOException if there was an error while creating the directories
//      */
//     void createDirectories(File directory) throws IOException;
// 
//     /**
//      * Creates the specified path with empty content.
//      *
//      * @param pathToCreate the path to create
//      * @throws IOException if there was error while creating the path
//      */
//     void touch(Path pathToCreate) throws IOException;
// }


import org.mockito.runners.MockitoJUnitRunner;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.*;
import com.github.approval.Reporter;
import com.github.approval.TestTempFile;
import com.github.approval.TestUtils;
import com.github.approval.utils.FileSystemUtils;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
package com.github.approval.reporters;

/*
 * #%L
 * com.github.github:approval-core
 * %%
 * Copyright (C) 2014 Nikolavp
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */




/**
 * User: github (Nikola Petrov) Date: 14-7-28 Time: 10:46
 */
@RunWith(MockitoJUnitRunner.class)
public class SwingInteractiveReporterTest {

    @Mock
    private Reporter reporter;

    @Mock
    private FileSystemUtils fileSystemUtils;

    @Rule
// Path: approval-core/src/main/java/com/github/approval/Reporter.java
// public interface Reporter {
//     /**
//      * Called by an {@link com.github.approval.Approval} object when values don't match in the approval process.
//      *
//      * @param oldValue the old value that was found in fileForVerification from old runs
//      * @param newValue the new value that was passed for verification
//      * @param fileForVerification the file for this approval value
//      * @param fileForApproval the file for the new content
//      */
//     void notTheSame(byte[] oldValue, File fileForVerification, byte[] newValue, File fileForApproval);
// 
//     /**
//      * Called by an {@link com.github.approval.Approval} object when a value for verification is produced but no old.
//      *
//      * @param value the new value that came from the verification
//      * @param fileForApproval the approval file(this contains the value that was passed in)
//      * @param fileForVerification the file for the this new approval value  @return true if the new value is approved and false otherwise
//      */
//     void approveNew(byte[] value, File fileForApproval, File fileForVerification);
// 
//     /**
//      * A method to check if this reporter is supported for the following file type or environment! Reporters are
//      * different for different platforms and file types and this in conjuction with {@link
//      * com.github.approval.reporters.Reporters#firstWorking} will allow you to plug different reporters for different
//      * environments(CI, Windows, Linux, MacOS, etc).
//      *
//      * @param fileForApproval the file that we want to approve
//      * @return true if we can approve the file and false otherwise
//      */
//     boolean canApprove(File fileForApproval);
// }
// 
// Path: approval-core/src/test/java/com/github/approval/TestTempFile.java
// public class TestTempFile implements MethodRule {
//     private File file;
// 
//     public TestTempFile() {
// 
//     }
//     public File file() {
//         return file;
//     }
// 
//     public Path path() {
//         return file.toPath();
//     }
// 
//     @Override
//     public Statement apply(Statement statement, FrameworkMethod frameworkMethod, Object o) {
//         try {
//             this.file = File.createTempFile("unit.tests", null);
//             // we don't want this to be created but just want a temporary name
//             this.file.delete();
//         } catch (IOException e) {
//             throw new RuntimeException("Couldn't create a temporary file. You are out of disc space or something!?",e);
//         }
//         return statement;
//     }
// }
// 
// Path: approval-core/src/test/java/com/github/approval/TestUtils.java
// public class TestUtils {
//     public static final String VALUE = "some\nmultiline\nnsimple\nstring";
//     public static final byte[] RAW_VALUE = VALUE.getBytes(StandardCharsets.UTF_8);
// 
//     public static File forApproval(TestTempFile tmpTestFile) {
//         return Approval.getApprovalPath(tmpTestFile.file().toPath()).toFile();
//     }
// }
// 
// Path: approval-core/src/main/java/com/github/approval/utils/FileSystemUtils.java
// public interface FileSystemUtils {
//     /**
//      * Write the byte value to the specified path.
//      * @param path the path
//      * @param value the value
//      * @throws IOException if there was an error while writing the content
//      */
//     void write(Path path, byte[] value) throws IOException;
// 
//     /**
//      * Read the specified path as byte array.
//      * @param path the path to read
//      * @return the path content
//      * @throws IOException if there was an error while reading the content
//      */
//     byte[] readFully(Path path) throws IOException;
// 
//     /**
//      * Move a path to another path.
//      * @param path the source
//      * @param filePath the destination
//      * @throws IOException if there was an error while moving the paths
//      */
//     void move(Path path, Path filePath) throws IOException;
// 
//     /**
//      * Create a directory and their parent directories as needed.
//      *
//      * @param directory the directory to create
//      * @throws IOException if there was an error while creating the directories
//      */
//     void createDirectories(File directory) throws IOException;
// 
//     /**
//      * Creates the specified path with empty content.
//      *
//      * @param pathToCreate the path to create
//      * @throws IOException if there was error while creating the path
//      */
//     void touch(Path pathToCreate) throws IOException;
// }


// Path: approval-core/src/test/java/com/github/approval/reporters/SwingInteractiveReporterTest.java
import org.mockito.runners.MockitoJUnitRunner;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.*;
import com.github.approval.Reporter;
import com.github.approval.TestTempFile;
import com.github.approval.TestUtils;
import com.github.approval.utils.FileSystemUtils;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;

package com.github.approval.reporters;

/*
 * #%L
 * com.github.github:approval-core
 * %%
 * Copyright (C) 2014 Nikolavp
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */




/**
 * User: github (Nikola Petrov) Date: 14-7-28 Time: 10:46
 */
@RunWith(MockitoJUnitRunner.class)
public class SwingInteractiveReporterTest {

    @Mock
    private Reporter reporter;

    @Mock
    private FileSystemUtils fileSystemUtils;

    @Rule
    public TestTempFile testFile = new TestTempFile();