From 8f1c6ba2cff4a76b3b5ad3a5ed9e801a1ac0bae6 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Wed, 31 Oct 2018 08:40:37 +0100
Subject: [PATCH] fix on copy command test - reaction requires
 products/reactants

---
 .../lcsb/mapviewer/commands/CopyCommandTest.java | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java b/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java
index c7ddbc5442..6cc46e9d42 100644
--- a/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java
+++ b/model-command/src/test/java/lcsb/mapviewer/commands/CopyCommandTest.java
@@ -10,6 +10,7 @@ import java.awt.geom.Point2D;
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
 
 import org.junit.After;
 import org.junit.Before;
@@ -321,15 +322,22 @@ public class CopyCommandTest extends CommandTestFunctions {
     Model model = new ModelFullIndexed(null);
     model.setNotes("Some description");
 
-    GenericProtein alias = new GenericProtein("a_id");
-    alias.setName("ad");
-    model.addElement(alias);
+    GenericProtein protein = new GenericProtein("a_id");
+    protein.setName("ad");
+    model.addElement(protein);
 
     Layer layer = new Layer();
     layer.setName("layer name");
     model.addLayer(layer);
 
-    model.addReaction(new Reaction());
+    Reaction reaction = new Reaction();
+    Product product = new Product(protein);
+    Reactant reactant = new Reactant(protein);
+    product.setLine(new PolylineData());
+    reactant.setLine(new PolylineData());
+    reaction.addProduct(product);
+    reaction.addReactant(reactant);
+    model.addReaction(reaction);
     return model;
   }
 
-- 
GitLab