package model;

import org.junit.Test;

import static org.junit.Assert.assertTrue;

public class TestTransform {

    @Test
    public void testTaskToString() {
        String correct = "task=option1:1,option2:1.0,option3:value,option4:[1,1,1,1],";

        Transform.Task task = new Transform.Task("task");
        task.addOption("option1", 1);
        task.addOption("option2", 1.0);
        task.addOption("option3", "value");
        task.addOption("option4", new Integer[]{1,1,1,1});
        String output = task.toString();

        String message = String.format("Task string malformed\nCorrect: %s\nOutput: %s", correct, output);
        assertTrue(message, output.equals(correct));
    }
}

@@ -110,152 +110,32 @@
 m %7B%0A
-%0A    @Test%0A    public void 
+    priva
 te
+ 
 st
-TaskToString() %7B%0A        String correct = %22task=option1:1,option2:1.0,option3:value,option4:%5B1,1,1,1%5D,%22;%0A%0A       
+atic final
  Tra
@@ -146,20 +146,20 @@
 rm.Task 
-task
+TASK
  = new T
@@ -177,20 +177,20 @@
 sk(%22
-task
+TASK
 %22);%0A    
     
@@ -181,32 +181,45 @@
 TASK%22);%0A    
-    task
+static %7B%0A        TASK
 .addOption(%22
@@ -232,36 +232,36 @@
 1%22, 1);%0A        
-task
+TASK
 .addOption(%22opti
@@ -272,36 +272,36 @@
 , 1.0);%0A        
-task
+TASK
 .addOption(%22opti
@@ -324,20 +324,20 @@
         
-task
+TASK
 .addOpti
@@ -383,32 +383,195 @@
     
+%7D%0A
     
-String output = task
+private static final String TASK_STRING = %22TASK=option1:1,option2:1.0,option3:value,option4:%5B1,1,1,1%5D,%22;%0A%0A    @Test%0A    public void testTaskToString() %7B%0A        String output = TASK
 .toS
@@ -669,23 +669,27 @@
 t: %25s%22, 
-correct
+TASK_STRING
 , output
@@ -737,15 +737,19 @@
 als(
-correct
+TASK_STRING
 ));%0A

Refactor TestTransform for more tests