-
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.
- Loading branch information
1 parent
ca25d96
commit 71a0dec
Showing
2 changed files
with
12 additions
and
20 deletions.
There are no files selected for viewing
Binary file not shown.
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,20 +1,12 @@ | ||
# library(testthat) | ||
# | ||
# # External functions call | ||
# # Test case 1: Test with all parameters | ||
# result <- | ||
# season_start_probabilities( | ||
# country = "zm", | ||
# station_id = "16", | ||
# start_dates = c(10, 20, 100) | ||
# ) | ||
# | ||
# # Test case 2: Test with missing parameters | ||
# result_2 <- | ||
# season_start_probabilities(country = "zm", station_id = "16") | ||
# | ||
# # Define test cases | ||
# test_that("season_start_probabilities returns correct results", { | ||
# expect_no_error(result) | ||
# expect_no_error(result_2) | ||
# }) | ||
library(testthat) | ||
library(rpicsa) | ||
|
||
# Test case 1 | ||
epicsawrap::gcs_auth_file(file = "tests/e-picsa-e630400792e7.json") | ||
test_1_results <- readRDS("tests/test_1_season_start_probabilities.rds") | ||
country <- "zm" | ||
station_id <- "test_1" | ||
result <- epicsawrap::season_start_probabilities(country, station_id, c(0, 150, 300)) | ||
test_that("Correct summaries are calculated", { | ||
expect_true(identical(result[[2]], test_1_results)) | ||
}) |