Example #1
0
        public void NuGet_and_SemVer_versions_equivalence_are_not_checked(string v)
        {
            var i = new InformationalVersion(v);

            i.IsValidSyntax.Should().BeTrue();
            i.ParseErrorMessage.Should().BeNull();
            InformationalVersion.Parse(v);
        }
Example #2
0
        public void parsing_invalid_InformationalVersion_carries_a_ParseErrorMessage(string v)
        {
            var i = new InformationalVersion(v);

            i.IsValidSyntax.Should().BeFalse();
            i.ParseErrorMessage.Should().NotBeNullOrWhiteSpace();
            Assert.Throws <ArgumentException>(() => InformationalVersion.Parse(v));
        }
        public void the_long_form_is_now_ignored_when_old_format_is_used(string v)
        {
            var i = new InformationalVersion(v);

            i.IsValidSyntax.Should().BeTrue();
            i.ParseErrorMessage.Should().BeNull();
            InformationalVersion.Parse(v);
        }
        public void parsing_new_format_normalized_the_version(string v)
        {
            var i = new InformationalVersion(v);

            i.IsValidSyntax.Should().BeTrue(i.ParseErrorMessage);
            i.ParseErrorMessage.Should().BeNull();
            i.Version.AsCSVersion.IsLongForm.Should().BeFalse();
            InformationalVersion.Parse(v);
        }