-
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.
Merge pull request #27 from hossain-khan/feat/semantic-data-tests
[ADDED] Semantic data timeline tests
- Loading branch information
Showing
4 changed files
with
38,005 additions
and
31 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
20 changes: 20 additions & 0 deletions
20
parser/src/test/kotlin/dev/hossain/timeline/model/SemanticTimelineTest.kt
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,20 @@ | ||
package dev.hossain.timeline.model | ||
|
||
import com.google.common.truth.Truth.assertThat | ||
import com.squareup.moshi.Moshi | ||
import kotlin.test.Test | ||
|
||
/** | ||
* Test cases for [Settings] | ||
*/ | ||
class SemanticTimelineTest { | ||
private val moshi: Moshi = Moshi.Builder().build() | ||
|
||
@Test | ||
fun `given records json should parse all records`() { | ||
val json = javaClass.getResourceAsStream("/semantic-2021-august.json")!!.bufferedReader().readText() | ||
val timeline = moshi.adapter(SemanticTimeline::class.java).fromJson(json)!! | ||
|
||
assertThat(timeline.timelineObjects).hasSize(125) | ||
} | ||
} |
Oops, something went wrong.