public void SourceStringTest()
 {
     string strFormat = string.Empty; // TODO: 初始化为适当的值
     VersionInfo target = new VersionInfo( strFormat ); // TODO: 初始化为适当的值
     string actual;
     actual = target.SourceString;
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
 public void RevisionTest()
 {
     string strFormat = string.Empty; // TODO: 初始化为适当的值
     VersionInfo target = new VersionInfo( strFormat ); // TODO: 初始化为适当的值
     int actual;
     actual = target.Revision;
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
 public void VersionInfoConstructorTest1()
 {
     int iMajor = 0; // TODO: 初始化为适当的值
     int iMinor = 0; // TODO: 初始化为适当的值
     int iRevision = 0; // TODO: 初始化为适当的值
     int iPatch = 0; // TODO: 初始化为适当的值
     VersionInfo target = new VersionInfo( iMajor, iMinor, iRevision, iPatch );
     Assert.Inconclusive( "TODO: 实现用来验证目标的代码" );
 }
 public void VersionInfoConstructorTest()
 {
     string strFormat = string.Empty; // TODO: 初始化为适当的值
     VersionInfo target = new VersionInfo( strFormat );
     Assert.Inconclusive( "TODO: 实现用来验证目标的代码" );
 }
 public void EqualsTest()
 {
     string strFormat = string.Empty; // TODO: 初始化为适当的值
     VersionInfo target = new VersionInfo( strFormat ); // TODO: 初始化为适当的值
     object xObject = null; // TODO: 初始化为适当的值
     bool expected = false; // TODO: 初始化为适当的值
     bool actual;
     actual = target.Equals( xObject );
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
 public void CompareTest1()
 {
     string strFormat = string.Empty; // TODO: 初始化为适当的值
     VersionInfo target = new VersionInfo( strFormat ); // TODO: 初始化为适当的值
     object xObject = null; // TODO: 初始化为适当的值
     object yObject = null; // TODO: 初始化为适当的值
     int expected = 0; // TODO: 初始化为适当的值
     int actual;
     actual = target.Compare( xObject, yObject );
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
 public void GetHashCodeTest()
 {
     string strFormat = string.Empty; // TODO: 初始化为适当的值
     VersionInfo target = new VersionInfo( strFormat ); // TODO: 初始化为适当的值
     int expected = 0; // TODO: 初始化为适当的值
     int actual;
     actual = target.GetHashCode();
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
 public void ToStringTest()
 {
     string strFormat = string.Empty; // TODO: 初始化为适当的值
     VersionInfo target = new VersionInfo( strFormat ); // TODO: 初始化为适当的值
     string expected = string.Empty; // TODO: 初始化为适当的值
     string actual;
     actual = target.ToString();
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
Exemplo n.º 9
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="xClientVersion"></param>
        /// <param name="yClientVersion"></param>
        /// <returns></returns>
        public static int Compare( VersionInfo xClientVersion, VersionInfo yClientVersion )
        {
            if ( IsNull( xClientVersion ) && IsNull( yClientVersion ) )
                return 0;
            else if ( IsNull( xClientVersion ) )
                return -1;
            else if ( IsNull( yClientVersion ) )
                return 1;

            return xClientVersion.CompareTo( yClientVersion );
        }
Exemplo n.º 10
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="strScriptName"></param>
        /// <param name="scriptVersion"></param>
        /// <returns></returns>
        public static ScriptAssemblyInfo GetScriptAssemblyInfo( string strScriptName, VersionInfo scriptVersion )
        {
            ScriptAssemblyInfo returnValue = null;

            do
            {
                s_LockScriptAssemblyInfos.Enter();
                {
                    IEnumerable<ScriptAssemblyInfo> valueEnumerable = null;
                    s_ScriptAssemblyInfos.TryEnumerateValuesForKey(strScriptName, out valueEnumerable);

                    if (valueEnumerable == null)
                        break;

                    foreach (ScriptAssemblyInfo scriptAssemblyInfo in valueEnumerable)
                    {
                        if ( scriptAssemblyInfo.Version == scriptVersion )
                        {
                            returnValue = scriptAssemblyInfo;
                            break;
                        }
                    }
                }
                s_LockScriptAssemblyInfos.Exit();

            } while ( false );

            return returnValue;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="byteHashCode"></param>
        internal void SetVersion( VersionInfo versionInfo )
        {
            if ( versionInfo == null )
                throw new Exception( "ScriptAssemblyInfo.SetVersion(...) - versionInfo == null error!" );

            m_VersionInfo = versionInfo;
        }