示例#1
0
        public void PreReleaseParticleCreation(string preReleaseLabel, uint preReleaseOrdinal)
        {
            var particle = new PreReleaseLabelParticle(preReleaseLabel, preReleaseOrdinal);

            particle.Label.Should().Be(preReleaseLabel);
            particle.Ordinal.Should().Be(preReleaseOrdinal);
        }
        internal FeaturePreReleaseLabel DeterminePreReleaseLabel(
            uint mainOrdinal,
            uint featureOrdinal)
        {
            var baseParticle    = new PreReleaseLabelParticle(Constants.DevelopPreReleaseLabel, mainOrdinal);
            var featureParticle = new PreReleaseLabelParticle(_featureName, featureOrdinal);

            return(new FeaturePreReleaseLabel(baseParticle, featureParticle));
        }
示例#3
0
        public void PreReleaseParticleInvalidCreation(string preReleaseLabel, uint preReleaseOrdinal)
        {
            Action action = () =>
            {
                // ReSharper disable once AssignmentIsFullyDiscarded
                _ = new PreReleaseLabelParticle(preReleaseLabel, preReleaseOrdinal);
            };

            action.Should().Throw <ArgumentException>();
        }
示例#4
0
        public void FeaturePreReleaseLabelRevision(
            uint developOrdinal,
            uint featureOrdinal,
            ushort expectedOutcome)
        {
            var developLabel = new PreReleaseLabelParticle("dev", developOrdinal);
            var featureLabel = new PreReleaseLabelParticle("featureA", featureOrdinal);
            var label        = new FeaturePreReleaseLabel(developLabel, featureLabel);

            label.CalculatedRevision.Should().Be(expectedOutcome);
        }