aboutsummaryrefslogtreecommitdiff
path: root/pkg/tests/testthat/test_PEC_soil.R
blob: 7901b69f32ecf8515de10e650217ec7f805ad2d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
library(mkin)
context("Setting up kinetic degradation models")

test_that("PEC_soil calculates correctly", {
  # Application of 100 g/ha gives 0.133 mg/kg under default assumptions
  expect_equal(PEC_soil(100), 0.1 * 4/3)

  # or 0.1 mg/kg assuming 25% interception
  expect_equal(PEC_soil(100, interception = 0.25), 0.1) 

  # Mixing depth of 1 cm gives five-fold PEC
  expect_equal(PEC_soil(100, interception = 0.25, mixing_depth = 1), 0.5)
})

Contact - Imprint