public void GetAll_ReturnsEmptyList_RepeatCounterList()
        {
            List <RepeatCounter> newList = new List <RepeatCounter> {
            };
            List <RepeatCounter> result  = RepeatCounter.GetAll();

            CollectionAssert.AreEqual(newList, result);
        }
예제 #2
0
        public void ClearAll_ClearAllRepeatCounters_void()
        {
            //arrange
            RepeatCounter catCounter   = new RepeatCounter("cat", "the cat and the dog are great");
            RepeatCounter dogCounter   = new RepeatCounter("dog", "the cat and the dog are great");
            RepeatCounter theCounter   = new RepeatCounter("the", "the cat and the dog are great");
            int           controlCount = 0;

            //act
            RepeatCounter.ClearAll();
            List <RepeatCounter> controlList = RepeatCounter.GetAll();
            int counterCount = controlList.Count;

            //assert
            Assert.AreEqual(controlCount, counterCount);
        }
예제 #3
0
        public void GetAll_FetchAllCounters_List()
        {
            //arrange
            RepeatCounter        catCounter  = new RepeatCounter("cat", "the cat and the dog are great");
            RepeatCounter        dogCounter  = new RepeatCounter("dog", "the cat and the dog are great");
            RepeatCounter        theCounter  = new RepeatCounter("the", "the cat and the dog are great");
            List <RepeatCounter> controlList = new List <RepeatCounter> {
                catCounter, dogCounter, theCounter
            };

            //act
            List <RepeatCounter> result = RepeatCounter.GetAll();

            //assert
            CollectionAssert.AreEqual(result, controlList);
        }