public void CompareEntitiesByScoreEqualReturns0() { ScoredEntity e1 = new ScoredEntity();; ScoredEntity e2 = new ScoredEntity();; int result = ScoredEntity.CompareEntitiesByScore(e1, e2); Assert.AreEqual(result, 0); }
public void CompareEntitiesByScoreSecondNullReturns1() { ScoredEntity e1 = new ScoredEntity(); ScoredEntity e2 = null; int result = ScoredEntity.CompareEntitiesByScore(e1, e2); Assert.AreEqual(result, 1); }
public void CompareEntitiesByScoreFirstNullReturnsMinus1() { ScoredEntity e1 = null; ScoredEntity e2 = new ScoredEntity(); int result = ScoredEntity.CompareEntitiesByScore(e1, e2); Assert.AreEqual(result, -1); }
public void CompareEntitiesByScoreBothNullReturns0() { ScoredEntity e1 = null; ScoredEntity e2 = null; int result = ScoredEntity.CompareEntitiesByScore(e1, e2); Assert.AreEqual(result, 0); }
public void CompareEntitiesByScoreSecondGreaterReturnsMinus1() { ScoredEntity e1 = new ScoredEntity(); e1.score = 1; ScoredEntity e2 = new ScoredEntity(); e2.score = 2; int result = ScoredEntity.CompareEntitiesByScore(e1, e2); Assert.AreEqual(result, -1); }
public void CompareEntitiesByScoreFirstGreaterReturns1() { ScoredEntity e1 = new ScoredEntity(); e1.score = 2; ScoredEntity e2 = new ScoredEntity(); e2.score = 1; int result = ScoredEntity.CompareEntitiesByScore(e1, e2); Assert.AreEqual(result, 1); }