mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 17:41:59 +02:00
more unit tests
This commit is contained in:
@ -165,7 +165,15 @@ test_that("as.mo works", {
|
||||
expect_equal(as.character(as.mo(c("TestingOwnID", "E. coli"),
|
||||
reference_df = data.frame(a = "TestingOwnID", b = "B_ESCHR_COL"))),
|
||||
c("B_ESCHR_COL", "B_ESCHR_COL"))
|
||||
expect_warning(as.character(as.mo("TestingOwnID",
|
||||
reference_df = NULL)))
|
||||
expect_warning(as.mo("TestingOwnID", reference_df = NULL))
|
||||
expect_error(as.mo("E. coli", reference_df = data.frame(a = "TestingOwnID")))
|
||||
|
||||
# combination of existing mo and certe
|
||||
expect_identical(as.character(as.mo(c("B_ESCHR_COL", "ESCCOL"))),
|
||||
c("B_ESCHR_COL", "B_ESCHR_COL"))
|
||||
|
||||
# TSN of prevalent and non prevalent ones
|
||||
expect_equal(mo_TSN(c("Gomphosphaeria aponina delicatula", "Escherichia coli")),
|
||||
c(717, 285))
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user