-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve test in UniParcProteomeFastaParser.java
- Loading branch information
1 parent
97d68a9
commit a13cefc
Showing
7 changed files
with
87 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
141 changes: 0 additions & 141 deletions
141
core-parser/src/test/java/org/uniprot/core/parser/fasta/UniParcFastaParserTest.java
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
...src/test/java/org/uniprot/core/parser/fasta/uniparc/UniParcEntryLightFastaParserTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package org.uniprot.core.parser.fasta.uniparc; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
import static org.uniprot.core.parser.fasta.uniparc.UniParcFastaParserTestUtils.*; | ||
import static org.uniprot.core.uniparc.impl.UniParcEntryLightBuilder.HAS_ACTIVE_CROSS_REF; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.uniprot.core.uniparc.*; | ||
import org.uniprot.core.uniparc.impl.UniParcEntryLightBuilder; | ||
|
||
/** | ||
* @author jluo | ||
* @date: 24 Jun 2019 | ||
*/ | ||
class UniParcEntryLightFastaParserTest { | ||
|
||
public static final String EXPECTED_FASTA_RESULT = """ | ||
>UPI0000083A08 status=active | ||
MSMAMARALATLGRLRYRVSGQLPLLDETAIEVMAGGQFLDGRKAREELGFFSTTALDDT | ||
LLRAIDWFRDNGYFNA"""; | ||
public static final String EXPECTED_FASTA_RESULT_INACTIVE = """ | ||
>UPI0000083A08 status=inactive | ||
MSMAMARALATLGRLRYRVSGQLPLLDETAIEVMAGGQFLDGRKAREELGFFSTTALDDT | ||
LLRAIDWFRDNGYFNA"""; | ||
|
||
|
||
@Test | ||
void testUniParcEntryLightToFasta() { | ||
UniParcEntryLight entry = createEntryLight(); | ||
String fasta = UniParcEntryLightFastaParser.toFasta(entry); | ||
assertEquals(EXPECTED_FASTA_RESULT, fasta); | ||
} | ||
|
||
@Test | ||
void testUniParcEntryLightToFastaInactive() { | ||
UniParcEntryLight entry = createEntryLight(); | ||
entry = UniParcEntryLightBuilder.from(entry).extraAttributesAdd(HAS_ACTIVE_CROSS_REF, false).build(); | ||
String fasta = UniParcEntryLightFastaParser.toFasta(entry); | ||
assertEquals(EXPECTED_FASTA_RESULT_INACTIVE, fasta); | ||
} | ||
|
||
private UniParcEntryLight createEntryLight() { | ||
return new UniParcEntryLightBuilder() | ||
.uniParcId("UPI0000083A08") | ||
.sequence(getSequence()) | ||
.build(); | ||
} | ||
|
||
} |
45 changes: 0 additions & 45 deletions
45
core-parser/src/test/java/org/uniprot/core/parser/fasta/uniparc/UniParcFastaParserTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.