コード例 #1
0
        public void WorkUnitProjectData_CopyConstructor_OtherIsNull_Test()
        {
            // Act
            var copy = new WorkUnitProjectData(null);

            // Assert
            Assert.AreEqual(0, copy.ProjectID);
            Assert.AreEqual(0, copy.ProjectRun);
            Assert.AreEqual(0, copy.ProjectClone);
            Assert.AreEqual(0, copy.ProjectGen);
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WorkUnitProjectData"/> class.
        /// </summary>
        /// <param name="other">The other instance from which data will be copied.</param>
        public WorkUnitProjectData(WorkUnitProjectData other)
        {
            if (other == null)
            {
                return;
            }

            ProjectID    = other.ProjectID;
            ProjectRun   = other.ProjectRun;
            ProjectClone = other.ProjectClone;
            ProjectGen   = other.ProjectGen;
        }
コード例 #3
0
        public void WorkUnitProjectData_CopyConstructor_Test()
        {
            // Arrange
            var data = new WorkUnitProjectData(1, 2, 3, 4);
            // Act
            var copy = new WorkUnitProjectData(data);

            // Assert
            Assert.AreEqual(data.ProjectID, copy.ProjectID);
            Assert.AreEqual(data.ProjectRun, copy.ProjectRun);
            Assert.AreEqual(data.ProjectClone, copy.ProjectClone);
            Assert.AreEqual(data.ProjectGen, copy.ProjectGen);
        }