From 5aee7aff0ddcb9b9d5df303ed57716afc465c4af Mon Sep 17 00:00:00 2001
From: tcarver <tjc>
Date: Tue, 26 Jul 2011 14:24:11 +0100
Subject: [PATCH] fix to run in headless

---
 .../components/TransferAnnotationToolTest.java        | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/test/uk/ac/sanger/artemis/components/TransferAnnotationToolTest.java b/test/uk/ac/sanger/artemis/components/TransferAnnotationToolTest.java
index a62f82201..412e61b82 100644
--- a/test/uk/ac/sanger/artemis/components/TransferAnnotationToolTest.java
+++ b/test/uk/ac/sanger/artemis/components/TransferAnnotationToolTest.java
@@ -48,6 +48,7 @@ import uk.ac.sanger.artemis.FeatureVector;
 import uk.ac.sanger.artemis.Options;
 import uk.ac.sanger.artemis.SimpleEntryGroup;
 
+import uk.ac.sanger.artemis.io.DocumentEntryFactory;
 import uk.ac.sanger.artemis.io.EntryInformation;
 import uk.ac.sanger.artemis.io.Key;
 import uk.ac.sanger.artemis.sequence.Bases;
@@ -187,11 +188,11 @@ public class TransferAnnotationToolTest
     final Document entryDocument =
         DocumentFactory.makeDocument(url.getFile());
 
-    final uk.ac.sanger.artemis.io.Entry emblEntry =
-      EntryFileDialog.getEntryFromFile(null, entryDocument,
-          artemisEntryInformation, false);
     try
     {
+      final uk.ac.sanger.artemis.io.Entry emblEntry =
+                DocumentEntryFactory.makeDocumentEntry(artemisEntryInformation,
+                		entryDocument, null);
       final Entry entry = new Entry(emblEntry);
       final EntryGroup entryGroup = new SimpleEntryGroup(entry.getBases());
       entryGroup.add(entry);
@@ -205,6 +206,10 @@ public class TransferAnnotationToolTest
     {
       Assert.fail(nse.getMessage());
     }
+    catch(Exception e)
+    {
+      Assert.fail(e.getMessage());
+    }
     return null;
   }
 
-- 
GitLab