public CollectionOrderTester(CollectionOrderTest order, IComparer comparer)
        {
            if (comparer==null)
                throw new ArgumentNullException("comparer");

            this.order = order;
            this.comparer = comparer;
        }
Пример #2
0
        public CollectionOrderTester(CollectionOrderTest order, IComparer comparer)
        {
            if (comparer == null)
            {
                throw new ArgumentNullException("comparer");
            }

            this.order    = order;
            this.comparer = comparer;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CollectionOrderFixtureAttribute" /> class. 
        /// </summary>
        /// <param name="order">The order in which the collections are sorted</param>
        /// <param name="comparerType">The type derived from <see cref="IComparer" /> that defines how the members of the collection willbe compared.</param>
        public CollectionOrderFixtureAttribute(
            CollectionOrderTest order,
            Type comparerType
            )
            : base() {
            if (comparerType == null)
                throw new ArgumentNullException("comparerType");

            this.order = order;
            this.comparer = (IComparer)Activator.CreateInstance(comparerType);
        }
Пример #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CollectionOrderFixtureAttribute" /> class.
        /// </summary>
        /// <param name="order">The order in which the collections are sorted</param>
        /// <param name="comparerType">The type derived from <see cref="IComparer" /> that defines how the members of the collection willbe compared.</param>
        public CollectionOrderFixtureAttribute(
            CollectionOrderTest order,
            Type comparerType
            )
            : base()
        {
            if (comparerType == null)
            {
                throw new ArgumentNullException("comparerType");
            }

            this.order    = order;
            this.comparer = (IComparer)Activator.CreateInstance(comparerType);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CollectionOrderFixtureAttribute" /> class. 
 /// </summary>
 /// <param name="order">The order in which the collections are sorted</param>
 public CollectionOrderFixtureAttribute(CollectionOrderTest order) {
     this.comparer = Comparer.Default;
 }
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CollectionOrderFixtureAttribute" /> class.
 /// </summary>
 /// <param name="order">The order in which the collections are sorted</param>
 public CollectionOrderFixtureAttribute(CollectionOrderTest order)
 {
     this.comparer = Comparer.Default;
 }