-
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.
Fix synonym obo writing #27 Add tests ✅
- Loading branch information
1 parent
d4b6434
commit 73aa990
Showing
5 changed files
with
64 additions
and
10 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
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,21 @@ | ||
namespace OBO.NET.Tests | ||
|
||
open Expecto | ||
open OBO.NET | ||
|
||
module TermSynonymTests = | ||
|
||
[<Tests>] | ||
let main = | ||
testList "TermSynonym" [ | ||
testCase "create" <| fun _ -> | ||
let actual = TermSynonym.create("\"Bacillus coli\"", Related, "synonym", []) | ||
Expect.equal actual.Text "\"Bacillus coli\"" "text" | ||
Expect.equal actual.Scope Related "scope" | ||
Expect.equal actual.TypeName "synonym" "typeName" | ||
Expect.equal actual.DBXrefs [] "dbxrefs" | ||
testCase "ToOboString" <| fun _ -> | ||
let actual = TermSynonym.create("\"Bacillus coli\"", Related, "synonym", []).ToLine() | ||
let expected = "\"Bacillus coli\" RELATED synonym []" | ||
Expect.equal actual expected "is not equal" | ||
] |