-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
54 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
open FsOboParser.Tests | ||
|
||
open Expecto | ||
|
||
|
||
[<EntryPoint>] | ||
let main argv = Tests.runTestsWithCLIArgs [] argv FsOboParser.Tests.TestTests.testTest | ||
let main argv = Tests.runTestsInAssemblyWithCLIArgs [] argv |
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,22 @@ | ||
namespace FsOboParser.Tests | ||
|
||
open Expecto | ||
open FsOboParser | ||
|
||
|
||
module OboOntologyTests = | ||
|
||
[<Tests>] | ||
let oboOntologyTest = | ||
testList "OboOntology" [ | ||
let testTerm1 = OboTerm.Create("id:1", Name = "testTerm1", Relationships = ["related_to id:2"; "unrelated_to id:3"; "antirelated_to id:4"]) | ||
let testTerm2 = OboTerm.Create("id:2", Name = "testTerm2", Relationships = ["related_to id:1"]) | ||
let testTerm3 = OboTerm.Create("id:3", Name = "testTerm3", Relationships = ["unrelated_to id:1"]) | ||
let testOntology = OboOntology.create [testTerm1; testTerm2; testTerm3] [] | ||
testList "GetRelatedTerms" [ | ||
testCase "returns correct related terms" <| fun _ -> | ||
let actual = testOntology.GetRelatedTerms(testTerm1) | ||
let expected = [testTerm1, "related_to", Some testTerm2; testTerm1, "unrelated_to", Some testTerm3; testTerm1, "antirelated_to", None] | ||
Expect.sequenceEqual actual expected "is not equal" | ||
] | ||
] |
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