public void EnvironmentModelEqualityComparer_Equals_YIsNotEnvironmentModel_False() { //------------Setup for test-------------------------- var resourceID = Guid.NewGuid(); var serverID = Guid.NewGuid(); const string ServerUri = "https://myotherserver1:3143"; const string Name = "test"; var environment = EnvironmentModelTest.CreateEqualityEnvironmentModel(resourceID, Name, serverID, ServerUri); //------------Execute Test--------------------------- var actual = EnvironmentModelEqualityComparer.Current.Equals(environment, new object()); //------------Assert Results------------------------- Assert.IsFalse(actual); }
public void EnvironmentModelEqualityComparer_GetHashCode_InvokesGetHashCodeOfArg() { //------------Setup for test-------------------------- var resourceID = Guid.NewGuid(); var serverID = Guid.NewGuid(); const string ServerUri = "https://myotherserver1:3143"; const string Name = "test"; var environment = EnvironmentModelTest.CreateEqualityEnvironmentModel(resourceID, Name, serverID, ServerUri); var expected = environment.GetHashCode(); //------------Execute Test--------------------------- var actual = EnvironmentModelEqualityComparer.Current.GetHashCode(environment); //------------Assert Results------------------------- Assert.AreEqual(expected, actual); }