Exemplo n.º 1
0
        static void CollectionSample()
        {
            CollectionExample ce = new CollectionExample();

            ce.MyArrayListExample();
            ce.MyListExample();
        }
Exemplo n.º 2
0
        protected IReadOnlyList <TItem> GetExampleCollection <TItem>(CollectionExample example) where TItem : class, IValidatableObject
        {
            IReadOnlyList <TItem> items = null;

            if (example == CollectionExample.Empty)
            {
                items = Array.Empty <TItem>();
            }
            else if (example != CollectionExample.Null)
            {
                var mock = SetupMock <TItem>(example == CollectionExample.Valid);
                items = new[] { mock.Object };
            }

            return(items);
        }