public void Get_word_translation_word_is_in_dictionary()
  {
      var service = new WordsService.Words();
      var result = service.AddNewEntry("weak", "weak translation");
      var translations = service.GetWord("weak");
      Assert.AreEqual("weak translation", translations[0]);
  }
 public void Get_word_that_is_not_present_in_dictionary()
 {
     var service = new WordsService.Words();
     var result = service.AddNewEntry("weak", "weak translation");
     Assert.IsTrue(result);
    
     var translations = service.GetWord("powerfull");
     Assert.IsNull(translations);
 }
        public void Add_second_translation_to_word_which_is_in_dictionary()
        {
            var service = new WordsService.Words();
            var result = service.AddNewEntry("weak", "weak translation");
            Assert.IsTrue(result);

            result = service.AddNewEntry("weak", "weak other meaning");
            Assert.IsTrue(result);
        }
        public void Add_word_and_translation_word_is_in_dictionary()
        {
            var service = new WordsService.Words();
            var result = service.AddNewEntry("weak", "weak translation");
            Assert.IsTrue(result);

            result = service.AddNewEntry("weak", "weak translation");
            Assert.IsFalse(result);
        }
        public void Get_word_translation_2_words_are_in_dictionary()
        {
            var service = new WordsService.Words();
            var result = service.AddNewEntry("weak", "weak translation");
            Assert.IsTrue(result);

            result = service.AddNewEntry("strong", "strong translation");
            Assert.IsTrue(result);

            var translations = service.GetWord("strong");
            Assert.AreEqual("strong translation", translations[0]);
        }
        public void Get_everything_that_conatins_word()
        {
            var service = new WordsService.Words();
            var result = service.AddNewEntry("weak", "weak translation");
            Assert.IsTrue(result);

            result = service.AddNewEntry("strong", "strong translation");
            Assert.IsTrue(result);

            var translations = service.GetWord("translation");
            var lst = new List<string> { "weak", "strong" };
            for (int i = 0; i < lst.Count; i++)
                Assert.AreEqual(lst[i], translations[i]);
        }
        public void Add_new_word_to_existing_translation()
        {
            var service = new WordsService.Words();
            var result = service.AddNewEntry("weak", "weak translation");
            Assert.IsTrue(result);

            result = service.AddNewEntry("strong", "strong translation");
            Assert.IsTrue(result);

            result = service.AddNewEntry("weak translation", "not powerfull");

            Assert.IsTrue(result);
            var words = service.GetWord("weak translation");

            var lst = new List<string> { "weak", "not powerfull" };
            for (int i = 0; i < lst.Count; i++)
                Assert.AreEqual(lst[i], words[i]);

        }