Add tests

Change-Id: Id3304b8e421846dd4b8e5d8c23b6ee0a24a685b8
diff --git a/tests/testthat/test-derekovecs.R b/tests/testthat/test-derekovecs.R
new file mode 100644
index 0000000..91ec5d1
--- /dev/null
+++ b/tests/testthat/test-derekovecs.R
@@ -0,0 +1,25 @@
+isWord <- function(value) {
+  return (is.character(value) & nchar(value) >= 1)
+}
+
+test_that("paradigmatic neighbours works", {
+  expect_equal(paradigmaticNeighbours("Test")$word[1], "Test")
+})
+
+test_that("syntagmaticNeighbours works", {
+  expect_true(isWord(syntagmaticNeighbours("Test")$word[1]))
+})
+
+test_that("countbasedCollocates works", {
+  expect_true(isWord(countbasedCollocates("Test")$word[1]))
+})
+
+test_that("collocationScores works", {
+  expect_true(collocationScores("Zähne", "putzen")$f2[1] > 0)
+})
+
+test_that("cosineSimilarity works", {
+  expect_equal(cosineSimilarity("Test", "Test"), 1.0)
+  cosSim <- cosineSimilarity("Test", "testen")
+  expect_true(cosSim >= 0 & cosSim <= 1.0)
+})