public void JenkinsJob_Null_Not_Equal() { // Arrange JenkinsJob origin; JenkinsJob other; // Act origin = new JenkinsJob(this.jenkinsConnection, "hudson.model.FreeStyleProject", "SameJob"); other = null; // Assert Assert.AreNotEqual(origin, other); Assert.IsFalse(origin.Equals(other)); }
public void JenkinsJob_Duplicate_Is_Equal() { // Arrange JenkinsJob origin; JenkinsJob other; // Act origin = new JenkinsJob(this.jenkinsConnection, "hudson.model.FreeStyleProject", "SameJob"); other = new JenkinsJob(this.jenkinsConnection, "hudson.model.FreeStyleProject", "SameJob"); // Assert Assert.AreEqual(origin, other); Assert.IsTrue(origin.Equals(other)); Assert.AreEqual(origin.GetHashCode(), other.GetHashCode()); }