public void ProteinBenchmarkIdentifier_AreEqualWhenProjectIDAndProcessorAndThreadsAreEqual() { // Arrange var x = new ProteinBenchmarkIdentifier(1234, "i9", 8); var y = new ProteinBenchmarkIdentifier(1234, "i9", 8); // Act var result = x.Equals(y) & x.GetHashCode() == y.GetHashCode(); // Assert Assert.IsTrue(result); }
public void ProteinBenchmarkIdentifier_AreNotEqualWhenProjectIDAreNotEqual() { // Arrange var x = new ProteinBenchmarkIdentifier(1234, ProteinBenchmarkIdentifier.NoProcessor, ProteinBenchmarkIdentifier.NoThreads); var y = new ProteinBenchmarkIdentifier(5678, ProteinBenchmarkIdentifier.NoProcessor, ProteinBenchmarkIdentifier.NoThreads); // Act var result = x.Equals(y) | x.GetHashCode() == y.GetHashCode(); // Assert Assert.IsFalse(result); }