Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
UniFIRE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Jira
Jira
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
UniProt Public
UniFIRE
Commits
b6f40cb9
Commit
b6f40cb9
authored
Jan 12, 2021
by
Hermann Zellner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manage resource with try-with-resources
Removed unused field
parent
6fe144d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
18 deletions
+14
-18
core/src/test/java/uk/ac/ebi/uniprot/urml/core/xml/writers/URMLFactWriterTest.java
...ebi/uniprot/urml/core/xml/writers/URMLFactWriterTest.java
+14
-15
io/src/test/java/uk/ac/ebi/uniprot/urml/output/xml/AnnotationXMLWriterTest.java
.../ebi/uniprot/urml/output/xml/AnnotationXMLWriterTest.java
+0
-3
No files found.
core/src/test/java/uk/ac/ebi/uniprot/urml/core/xml/writers/URMLFactWriterTest.java
View file @
b6f40cb9
...
...
@@ -17,16 +17,15 @@
package
uk.ac.ebi.uniprot.urml.core.xml.writers
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
javax.xml.bind.JAXBException
;
import
javax.xml.stream.XMLStreamException
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.io.TempDir
;
import
org.uniprot.urml.facts.FactSet
;
import
javax.xml.bind.JAXBException
;
import
javax.xml.stream.XMLStreamException
;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.io.FileOutputStream
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertDoesNotThrow
;
import
static
org
.
uniprot
.
urml
.
facts
.
ProteinAnnotation
.
builder
;
...
...
@@ -39,18 +38,18 @@ class URMLFactWriterTest {
File
tempDir
;
@Test
void
testShouldVerifyThatFactSuperSetIsWrittenSuccessfully
()
throws
FileNotFound
Exception
,
JAXBException
,
XMLStreamException
{
void
testShouldVerifyThatFactSuperSetIsWrittenSuccessfully
()
throws
IO
Exception
,
JAXBException
,
XMLStreamException
{
//given
File
outputFile
=
new
File
(
tempDir
.
getAbsolutePath
()+
"/test.xml"
);
URMLFactWriter
factWriter
=
new
URMLFactWriter
(
new
FileOutputStream
(
outputFile
));
FactSet
factSet
=
FactSet
.
builder
()
.
withFact
(
builder
().
withType
(
"type1"
).
build
(),
builder
().
withType
(
"type2"
).
build
())
.
build
();
//when and then
assertDoesNotThrow
(()
->
factWriter
.
write
(
factSet
));
try
(
URMLFactWriter
factWriter
=
new
URMLFactWriter
(
new
FileOutputStream
(
outputFile
)))
{
FactSet
factSet
=
FactSet
.
builder
()
.
withFact
(
builder
().
withType
(
"type1"
).
build
(),
builder
().
withType
(
"type2"
).
build
())
.
build
();
//when and then
assertDoesNotThrow
(()
->
factWriter
.
write
(
factSet
));
}
}
...
...
io/src/test/java/uk/ac/ebi/uniprot/urml/output/xml/AnnotationXMLWriterTest.java
View file @
b6f40cb9
...
...
@@ -20,7 +20,6 @@ package uk.ac.ebi.uniprot.urml.output.xml;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
org.junit.jupiter.api.Test
;
import
org.junit.rules.TemporaryFolder
;
import
org.uniprot.urml.facts.*
;
import
org.xmlunit.builder.DiffBuilder
;
import
org.xmlunit.diff.Diff
;
...
...
@@ -32,8 +31,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
*/
public
class
AnnotationXMLWriterTest
{
public
TemporaryFolder
folder
=
new
TemporaryFolder
();
private
final
static
String
ACCESSION_1
=
"P12345"
;
private
final
static
String
ACCESSION_2
=
"P12346"
;
private
final
static
String
ANNOTATION_1
=
"Some annotation value"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment