public void Versions(string looseVersionString, string strictVersionString) { var looseVersion = new Version(looseVersionString, true); // Loose version is equivalent to strict version var strictVersion = new Version(strictVersionString); Assert.Equal(strictVersion.Clean(), looseVersion.Clean()); Assert.Equal(strictVersion, looseVersion); // Loose version should be invalid in strict mode Assert.Throws<ArgumentException>(() => new Version(looseVersionString)); }