tests/testthat/test-manipulate_initial_data.R

context("manipulate_initial_data")

test_that("manipulate_initial_data works", {
	# skip_on_cran()
	expect_type(aggregate_transactions(investor, unit = "1 month"), "list")
	expect_type(reduce_transactions(investor, unit = "1 month"), "list")
	expect_type(clean_transactions(investor, unit = "1 month"), "list")
	expect_type(clean_transactions(investor, unit = "1 month", reduce = TRUE), "list")
	expect_type(aggregate_market_prices(marketprices, unit = "1 month"), "list")
	expect_type(subset_market_prices(marketprices, investor$asset[1], investor$datetime), "list")
	expect_type(subset_market_prices(marketprices, investor$asset[1], investor$datetime, unit = "1 secs"), "list")
	expect_type(generate_data(investor, marketprices, investor_name = "ABC"), "list")
	expect_type(generate_data(investor, marketprices, investor_name = "ABC", subset = TRUE), "list")
	expect_type(generate_data(investor, marketprices, investor_name = "ABC", unit = "1 secs"), "list")
})
marcozanotti/dispositionEffect documentation built on May 31, 2022, 12:51 p.m.