Example #1
0
        public void List()
        {
            var item = new Leaf(25);

            // Get instance of List<T>
            _moq.List <Leaf>()
            .Add(item);

            // Extension methods to add T item to List<T>
            _moq.Add(item);
            _moq.Add(item, item, item);
            _moq.AddItems(new List <Leaf> {
                item, item, item
            });

            // Confirm List has 8 Items
            _moq.Of <IContext>()
            .Object.Leaves.Should().HaveCount(8);
        }