示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public bool Equals(Project other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Id == other.Id &&
                   string.Equals(Identifier, other.Identifier, StringComparison.OrdinalIgnoreCase) &&
                   string.Equals(Description, other.Description, StringComparison.OrdinalIgnoreCase) &&
                   (Parent != null ? Parent.Equals(other.Parent) : other.Parent == null) &&
                   string.Equals(HomePage, other.HomePage, StringComparison.OrdinalIgnoreCase) &&
                   CreatedOn == other.CreatedOn &&
                   UpdatedOn == other.UpdatedOn &&
                   Status == other.Status &&
                   IsPublic == other.IsPublic &&
                   InheritMembers == other.InheritMembers &&
                   (Trackers != null ? Trackers.Equals <ProjectTracker>(other.Trackers) : other.Trackers == null) &&
                   (CustomFields != null ? CustomFields.Equals <IssueCustomField>(other.CustomFields) : other.CustomFields == null) &&
                   (IssueCategories != null ? IssueCategories.Equals <ProjectIssueCategory>(other.IssueCategories) : other.IssueCategories == null) &&
                   (EnabledModules != null ? EnabledModules.Equals <ProjectEnabledModule>(other.EnabledModules) : other.EnabledModules == null) &&
                   (TimeEntryActivities != null ? TimeEntryActivities.Equals <ProjectTimeEntryActivity>(other.TimeEntryActivities) : other.TimeEntryActivities == null) &&
                   (DefaultAssignee != null ? DefaultAssignee.Equals(other.DefaultAssignee) : other.DefaultAssignee == null) &&
                   (DefaultVersion != null ? DefaultVersion.Equals(other.DefaultVersion) : other.DefaultVersion == null));
        }
示例#2
0
        public static IVersion CreateVersion()
        {
            IVersion versionData = new DefaultVersion(); // SIMPLEST VARIANT NOW

            versionData.CurrentVersion = CommonConst.CURRENT_VERSION;
            return(versionData);
        }
示例#3
0
        public void GetFileVersion_ReturnsDefault()
        {
            var versionStrategy = new DefaultVersion(4, 4);

            Assert.AreEqual(4, versionStrategy.GetFileVersion(""));
        }