Пример #1
0
        public void GetId_WordsInstantiateWithAnIdAndGetterReturns_Int()
        {
            WordCounter.ClearAll();
            //Arrange
            string      description     = "Walk";
            string      test            = " this";
            WordCounter newWordCounter  = new WordCounter(description, test);
            WordCounter newWordCounter2 = new WordCounter(description, test);

            //Act
            int result = newWordCounter2.GetId();

            //Assert why is this 3??????????????????????????????
            Assert.AreEqual(2, result);
        }
Пример #2
0
        public void GetAll_ReturnsAllwordObjects_wordList()
        {
            WordCounter.ClearAll();
            //Arrange
            string             name1           = "test";
            string             name2           = "newtest";
            WordCounter        newWordCounter1 = new WordCounter(name1, name2);
            WordCounter        newWordCounter  = new WordCounter(name1, name2);
            List <WordCounter> newList         = new List <WordCounter> {
                newWordCounter1, newWordCounter
            };
            //Act
            List <WordCounter> result = WordCounter.GetAll();

            Console.WriteLine("how many items" + result.Count);
            //Assert
            CollectionAssert.AreEqual(newList, result);
        }
Пример #3
0
 public void Dispose()
 {
     WordCounter.ClearAll();
 }
 public ActionResult DeleteAll()
 {
     WordCounter.ClearAll();
     return(View());
 }