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

            options.Add(new TestOption());

            // act
            options.TryGet(out TestOption option).Should().BeTrue();

            // assert
            option.Should().NotBeNull();
        }
예제 #2
0
        public void all_should_return_expected_options()
        {
            // arrange
            var options = new AnyOptions();

            options.Add(new TestOption());

            // act
            var all = options.All <TestOption>();

            // assert
            all.Should().ContainItemsAssignableTo <TestOption>();
        }
예제 #3
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();
        }