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); }
/// <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; }
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); }