Example #1
0
        public void Ignore_DescriptorIsNull_ArgumentNullException()
        {
            // arrange
            // act
            void Action() => InterfaceTypeDescriptorExtensions.Ignore<IFoo>(null, t => t.Bar);

            // assert
            Assert.Throws<ArgumentNullException>(Action);
        }
Example #2
0
        public void Ignore_ExpressionIsNull_ArgumentNullException()
        {
            // arrange
            InterfaceTypeDescriptor <IFoo> descriptor =
                InterfaceTypeDescriptor.New <IFoo>(DescriptorContext.Create());

            // act
            Action action = () =>
                            InterfaceTypeDescriptorExtensions
                            .Ignore(descriptor, null);

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }