
package org.onebeartoe.modeling.openscad.test.suite.utils;

import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import org.onebeartoe.modeling.openscad.test.suite.model.GeneratePngBaselineResults;
import org.onebeartoe.modeling.openscad.test.suite.model.ImageComparisonResult;
import org.onebeartoe.modeling.openscad.test.suite.model.RunProfile;
import static org.testng.Assert.assertNotNull;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

/**
 * This class test the specification for the OpenScadTestSuiteService specification.
 */
public class OpenScadTestSuiteServiceSpecification
{
    private OpenScadTestSuiteService implementation;

    @BeforeClass
    public void initializeTest()
    {
        implementation = new OpenScadTestSuiteService();
    }
    
    @Test
    public void compareImages()
    {
        RunProfile runProfile = new RunProfile();
        
        runProfile.openscadPaths = new ArrayList();        
        
        ImageComparisonResult result = implementation.compareImages(runProfile);
        
        assertNotNull(result);
    }

    @Test
    public void generateProposedBaselines() throws IOException, InterruptedException
    {
        RunProfile runProfile = new RunProfile();
        
        runProfile.openscadPaths = new ArrayList();
        
        GeneratePngBaselineResults results = implementation.generateProposedBaselines(runProfile);
        
        assertNotNull(results);
    }
}

@@ -103,20 +103,27 @@
 io.file.
-Path
+FileSystems
 ;%0Aimport
@@ -132,22 +132,21 @@
 ava.
-util.ArrayList
+nio.file.Path
 ;%0Aim
@@ -160,16 +160,21 @@
 va.util.
+Array
 List;%0Aim
@@ -336,16 +336,99 @@
 Result;%0A
+import org.onebeartoe.modeling.openscad.test.suite.model.OpenScadTestSuiteResults;%0A
 import o
@@ -1610,10 +1610,571 @@
 ;%0A    %7D%0A
+    %0A    @Test%0A    public void serviceRequest() throws Exception%0A    %7B%0A        RunProfile runProfile = new RunProfile();%0A%0APath path = FileSystems.getDefault().getPath(%22.%22).toAbsolutePath();%0ASystem.out.println(%22pwd: %22 + path.toString());        %0A        %0A        runProfile.path = %22../models/src/main/openscad/basics/primitives/cube%22;%0A        %0A        runProfile.openscadPaths = new ArrayList();%0A        %0A        OpenScadTestSuiteResults results = implementation.serviceRequest(runProfile);%0A                                %0A        assertNotNull(results);%0A    %7D%0A
 %7D%0A

add more test and use one-liner to print current working directory