コード例 #1
0
        public void BuildPropertyThrowsExceptionWithNullPropertyInfo()
        {
            var sut = new BuildPropertyWrapper();

            Action action = () => sut.RunTest();

            action.Should().Throw <ArgumentNullException>();
        }
コード例 #2
0
        public void BuildPropertyThrowsExceptionWhenNotInitialized()
        {
            var property = typeof(Person).GetProperty(nameof(Person.FirstName)) !;

            var sut = new BuildPropertyWrapper();

            Action action = () => sut.RunTest(property);

            action.Should().Throw <InvalidOperationException>();
        }