Пример #1
0
        public void VersionComparisonTests(string firstText, string secondTest, bool result)
        {
            var first  = _versionProvider.GetVersionFromText(firstText);
            var second = _versionProvider.GetVersionFromText(secondTest);

            Assert.Equal(first > second, result);
        }
Пример #2
0
        public KojtoCadVersion GetInstalledProductVersion()
        {
            var versionText = _utilityClass.GetCurrentAssemblyFileVersion();
            var version     = _versionProvider.GetVersionFromText(versionText);

            if (!_versionValidator.IsValid(version))
            {
                throw new Exception("Invalid product version!");
            }
            return(version);
        }