Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
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());
        }