Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        public void JenkinsJob_Different_Not_Equal()
        {
            // Arrange
            JenkinsJob origin;
            JenkinsJob other;

            // Act
            origin = new JenkinsJob(this.jenkinsConnection, "hudson.model.FreeStyleProject", "SameJob");
            other  = new JenkinsJob(this.jenkinsConnection, "hudson.model.FreeStyleProject", "DifferentJob");

            // Assert
            Assert.AreNotEqual(origin, other);
            Assert.IsFalse(origin.Equals(other));
            Assert.AreNotEqual(origin.GetHashCode(), other.GetHashCode());
        }