public void Equals_ReturnsTrue_ForEqualKnapsackItems() { var e1 = new KnapsackItem <char>('a', 1, 2); var e2 = new KnapsackItem <char>('a', 1, 2); Assert.IsTrue(e1.Equals(e2)); }
public void Equals_ReturnsFalse_ForNonEqualWeights() { var e1 = new KnapsackItem <char>('a', 1, 2); var e2 = new KnapsackItem <char>('a', 1, 3); Assert.IsFalse(e1.Equals(e2)); }
public void Equals_ReturnsFalse_ForNullObject() { var e1 = new KnapsackItem <char>('a', 1, 2); Assert.IsFalse(e1.Equals(null)); }