A class that manages a collection of T:Stumps.Stump objects.
Наследование: IStumpsManager
Пример #1
0
 private void AddStumpsToManager(StumpsManager manager, int count)
 {
     for (var i = 1; i <= count; i++)
     {
         manager.AddStump(new Stump(i.ToString()));
     }
 }
Пример #2
0
        public void DeleteAll_WhenCalled_RemovesAllSumps()
        {
            const int stumpCount = 3;

            var manager = new StumpsManager();

            AddStumpsToManager(
                manager: manager,
                count: 3
                );

            Assert.AreEqual(
                expected: stumpCount,
                actual: manager.Count
                );

            manager.DeleteAll();

            Assert.AreEqual(
                expected: 0,
                actual: manager.Count
                );
        }