예제 #1
0
        public void get_should_throw_exception_when_option_is_not_present()
        {
            // arrange
            var options = new AnyOptions();

            // act
            Action get = () => options.Get <TestOption>();

            // assert
            get.Should().Throw <KeyNotFoundException>();
        }
예제 #2
0
        public void get_should_return_added_option()
        {
            // arrange
            var options = new AnyOptions();

            options.Add(new TestOption());

            // act
            var option = options.Get <TestOption>();

            // assert
            option.Should().NotBeNull();
        }