Example #1
0
        public void ExtractVersion_NullConfig_ReturnsNull()
        {
            // Arrange

            var provider = new DefaultVersionProvider();

            // Act

            var result = provider.ExtractVersion(null);

            // Assert

            Assert.IsNull(result);
        }
Example #2
0
        public void ExtractVersion_InvalidVersion_ReturnsNull()
        {
            // Arrange

            var provider = new DefaultVersionProvider();

            // Act

            var result = provider.ExtractVersion(new DefaultVersionProvider.Bootstrap()
            {
                ImplementationVersion = "4.5.0a"
            });

            // Assert

            Assert.IsNull(result);
        }
Example #3
0
        public void ExtractVersion_VersionWithDash_ReturnsVersion()
        {
            // Arrange

            var provider = new DefaultVersionProvider();

            // Act

            var result = provider.ExtractVersion(new DefaultVersionProvider.Bootstrap()
            {
                ImplementationVersion = "4.5.0-somethingelse"
            });

            // Assert

            Assert.AreEqual(Version45, result);
        }
        public void ExtractVersion_VersionWithoutDash_ReturnsVersion()
        {
            // Arrange

            var provider = new DefaultVersionProvider();

            // Act

            var result = provider.ExtractVersion(new DefaultVersionProvider.Bootstrap()
            {
                ImplementationVersion = "4.5.0"
            });

            // Assert

            Assert.AreEqual(Version45, result);
        }
        public void ExtractVersion_NullConfig_ReturnsNull()
        {
            // Arrange

            var provider = new DefaultVersionProvider();

            // Act

            var result = provider.ExtractVersion(null);

            // Assert

            Assert.IsNull(result);
        }
        public void ExtractVersion_InvalidVersion_ReturnsNull()
        {
            // Arrange

            var provider = new DefaultVersionProvider();

            // Act

            var result = provider.ExtractVersion(new DefaultVersionProvider.Bootstrap()
            {
                ImplementationVersion = "4.5.0a"
            });

            // Assert

            Assert.IsNull(result);
        }