public void Constructs_empty()
        {
            var collection = new InvalidValuesClassCollection <int>();

            Assert.IsEmpty(collection);
            Assert.Count(0, collection);
        }
        public void Adds_several_times_classes_arguments_associated_with_same_exception_type_should_throw_exception()
        {
            var collection = new InvalidValuesClassCollection <int>();

            collection.Add(typeof(ArgumentOutOfRangeException), 1, 2, 3);
            collection.Add(typeof(ArgumentOutOfRangeException), 4, 5, 6);
        }
 public void Adds_classes_Ok()
 {
     var collection = new InvalidValuesClassCollection<int>();
     collection.Add(typeof(ArgumentOutOfRangeException), 1, 2, 3);
     collection.Add(new InvalidValuesClass<int>(typeof(ArgumentException)) { 4, 5, 6 });
     collection.Add(typeof(InvalidOperationException), 7, 8, 9);
     Assert.Count(3, collection);
     Assert.AreElementsEqualIgnoringOrder(new[] { typeof(ArgumentOutOfRangeException), typeof(ArgumentException), typeof(InvalidOperationException) }, collection.Select(x => x.ExpectedExceptionType));
 }
        public void Adds_classes_Ok()
        {
            var collection = new InvalidValuesClassCollection <int>();

            collection.Add(typeof(ArgumentOutOfRangeException), 1, 2, 3);
            collection.Add(new InvalidValuesClass <int>(typeof(ArgumentException))
            {
                4, 5, 6
            });
            collection.Add(typeof(InvalidOperationException), 7, 8, 9);
            Assert.Count(3, collection);
            Assert.AreElementsEqualIgnoringOrder(new[] { typeof(ArgumentOutOfRangeException), typeof(ArgumentException), typeof(InvalidOperationException) }, collection.Select(x => x.ExpectedExceptionType));
        }
        public void Adds_null_exception_type_should_throw_exception()
        {
            var collection = new InvalidValuesClassCollection <int>();

            collection.Add(null, 1, 2, 3);
        }
        public void Adds_null_invalid_class_should_throw_exception()
        {
            var collection = new InvalidValuesClassCollection <int>();

            collection.Add((InvalidValuesClass <int>)null);
        }
 public void Constructs_empty()
 {
     var collection = new InvalidValuesClassCollection<int>();
     Assert.IsEmpty(collection);
     Assert.Count(0, collection);
 }
 public void Adds_several_times_classes_associated_with_same_exception_type_should_throw_exception()
 {
     var collection = new InvalidValuesClassCollection<int>();
     collection.Add(new InvalidValuesClass<int>(typeof(ArgumentOutOfRangeException)));
     collection.Add(new InvalidValuesClass<int>(typeof(ArgumentOutOfRangeException)));
 }
 public void Adds_null_invalid_class_should_throw_exception()
 {
     var collection = new InvalidValuesClassCollection<int>();
     collection.Add((InvalidValuesClass<int>)null);
 }
 public void Adds_null_exception_type_should_throw_exception()
 {
     var collection = new InvalidValuesClassCollection<int>();
     collection.Add(null, 1, 2, 3);
 }