package com.nikolavp.approval.reporters;

import com.nikolavp.approval.Approval;
import org.junit.Assume;
import org.junit.Test;

import java.awt.*;
import java.nio.file.FileSystems;

/**
 *
 * User: nikolavp
 * Date: 26/02/14
 * Time: 14:28
 */

public class ReportersExamplesIT {

    @Test
    public void testGvimApprovalProcess() throws Exception {
        Assume.assumeTrue(Desktop.isDesktopSupported());
        Approval approval = new Approval(Reporters.gvim());

        approval.verify("some test content".getBytes(), FileSystems.getDefault().getPath("target", "verifications", "testGvimApprovalProcess.txt"));
    }

    @Test
    public void testConsoleApprovalProcess() throws Exception {
        Assume.assumeTrue(Desktop.isDesktopSupported());
        Approval approval = new Approval(Reporters.console());
        approval.verify("some test content".getBytes(), FileSystems.getDefault().getPath("target", "verifications", "testConsoleApprovalProcess.txt"));
    }

    @Test
    public void testGeditApprovalProcess() throws Exception {
        Assume.assumeTrue(Desktop.isDesktopSupported());
        Approval approval = new Approval(Reporters.gedit());
        approval.verify("some test content".getBytes(), FileSystems.getDefault().getPath("target", "verifications", "testGeditApprovalProcess.txt"));
    }
}

@@ -99,16 +99,41 @@
 Assume;%0A
+import org.junit.Ignore;%0A
 import o
@@ -147,16 +147,16 @@
 t.Test;%0A
-
 %0Aimport 
@@ -264,17 +264,24 @@
 :28%0A */%0A
+@Ignore
 %0A
-
 public c
@@ -531,32 +531,34 @@
 ome test content
+%5Cn
 %22.getBytes(), Fi
@@ -883,32 +883,34 @@
 ome test content
+%5Cn
 %22.getBytes(), Fi
@@ -1196,24 +1196,24 @@
 s.gedit());%0A
-
         appr
@@ -1242,16 +1242,18 @@
  content
+%5Cn
 %22.getByt

Add new lines here because they are added by some editors(vim for example)