context("Check that dateIndexToInteger behaves as expected") getDataTest = function(n, shift) { n = 1500 series = list() s = rep(0, 24) for (i in seq_len(n)) { level = i %% 3mean(s[[index]]) serie = s # 10 series with NAs for index 2 if (index == 2 && i >= 60 && i<= 90) serie[sample(seq_len(L),1)] = NA series[[i]] = list("level"=i%%3, "serie"=s, "time"=) } data = new("Data", data=series) } test_that("integer index matches date in data, predict_at == 0", { data = getData( dateIndexToInteger = function(index, data) }) test_that("integer index matches date in data, predict_at > 0", { ####TODO: CSV as raw data in inst/extdata http://r-pkgs.had.co.nz/data.html