Example #1
0
        public void ShouldUseSinceTarget_IfNotExplicitlySet()
        {
            var input = new FallbackVersionInput();

            var validatedInput = input.Validate(withBaseline: true, projectVersion: "development", sinceTarget: "main");

            validatedInput.ShouldBe("main");
        }
Example #2
0
        public void ShouldUseProvidedInputValue()
        {
            var input = new FallbackVersionInput {
                SuppliedInput = "development"
            };

            var validatedInput = input.Validate(withBaseline: true, projectVersion: "feat/feat4", sinceTarget: "master");

            validatedInput.ShouldBe("development");
        }
Example #3
0
        public void ShouldNotValidate_IfNotEnabled()
        {
            var input = new FallbackVersionInput {
                SuppliedInput = "master"
            };

            var validatedInput = input.Validate(withBaseline: false, projectVersion: "master", sinceTarget: "master");

            validatedInput.ShouldBe(new SinceTargetInput().Default);
        }