Пример #1
0
        public void CreateListInstance_Return_Valid_Result()
        {
            List <Exception> obj = null;

            Assert.That(() => obj = ClassUtil.CreateListInstance <Exception>(), Throws.Nothing);
            Assert.That(obj, Is.Not.Null);
            Assert.That(obj, Is.TypeOf <List <Exception> >());
        }
Пример #2
0
        public void CreateListInstance_By_Type_Return_Valid_Result()
        {
            Type             type         = typeof(Exception);
            Type             expectedType = typeof(List <Exception>);
            List <Exception> obj          = null;

            Assert.That(() => obj = (List <Exception>)ClassUtil.CreateListInstance(type), Throws.Nothing);
            Assert.That(obj, Is.Not.Null);
            Assert.That(obj, Is.TypeOf(expectedType));
        }
Пример #3
0
 public void CreateListInstance_Throws_ArgumentNullException()
 {
     AssertThrowsException <ArgumentNullException>(() => ClassUtil.CreateListInstance(null), "type");
 }