public void BuildingFooBarWithNoSettingsThrowsException()
        {
            // Arrange
            var fooBarBuilder = new FooBarBuilder();

            // Act && Assert
            Assert.ThrowsException <InvalidOperationException>(() => fooBarBuilder.Build());
        }
        public void BuildFooBarWithRuleOutOfRangeThrowsException(int serialIndex, int from, int to)
        {
            // Arrange
            var fooBarBuilder = new FooBarBuilder().SetRange(from, to)
                                .AddRule(serialIndex, "FooBar");

            // Act && Assert
            Assert.ThrowsException <ArgumentOutOfRangeException>(() => fooBarBuilder.Build());
        }
        public void BuildFooBarWithRuleInsideOfRangeIsSuccesful()
        {
            // Arrange
            var fooBarBuilder = new FooBarBuilder().SetRange(1, 100)
                                .AddRule(3, "FooBar");

            // Act
            var fooBar = fooBarBuilder.Build();

            // Assert
            Assert.IsNotNull(fooBar);
        }
        public void BuildingFooBarWithDefaultsIsSuccesful()
        {
            // Arrange
            var fooBarBuilder = new FooBarBuilder()
                                .UseDefaults();

            // Act
            var fooBar = fooBarBuilder.Build();

            // Assert
            Assert.IsNotNull(fooBar);
        }