コード例 #1
0
            public void AddsObjectToList()
            {
                var list      = new DeletableObjectList <TestDeletable>();
                var deletable = new TestDeletable();

                list.Add(deletable);

                list.Should().ContainSingle().Which.Should().Be(deletable);
            }
コード例 #2
0
            public void CanAddMultipleItems(int itemsToAdd)
            {
                var list  = new DeletableObjectList <TestDeletable>();
                var items = getDeletables(itemsToAdd);

                foreach (var item in items)
                {
                    list.Add(item);
                }

                list.Should().BeEquivalentTo(items, withExactSameItems);
            }
コード例 #3
0
            public void CreatesEmptyListForPositiveValues(int count)
            {
                var list = new DeletableObjectList <IDeletable>(count);

                list.Should().BeEmpty();
            }
コード例 #4
0
            public void CreatesEmptyListForZeroValue()
            {
                var list = new DeletableObjectList <IDeletable>(0);

                list.Should().BeEmpty();
            }
コード例 #5
0
            public void CreatesEmptyList()
            {
                var list = new DeletableObjectList <IDeletable>();

                list.Should().BeEmpty();
            }