Ejemplo n.º 1
0
        public void Throw_If_Given_Bad_Values()
        {
            // arrange
            var    help       = new FullHelp();
            Action mightThrow = () => help.AddExample(null);

            // act
            // assert
            mightThrow.Should().Throw <ArgumentNullException>();
        }
Ejemplo n.º 2
0
        public void Allow_Examples_To_Be_Added()
        {
            // arrange
            var help = new FullHelp();

            // act
            help.AddExample(new Example());

            // assert
            help.Examples.Should().HaveCount(1);
        }
Ejemplo n.º 3
0
        public void Only_Allow_Examples_To_Be_Added_More_Than_Once()
        {
            // arrange
            var help = new FullHelp();

            // act
            var example = new Example();

            help.AddExample(example);
            help.AddExample(example);

            // assert
            help.Examples.Should().HaveCount(1);
        }