public void RepoLadderTestsAddLadder() { List <Ladder> ladderdb = new List <Ladder> { new Ladder { LadderID = 0, GameTitle = "Halo", MinPlayers = 2 }, }; List <Ladder> expected = new List <Ladder> { new Ladder { LadderID = 0, GameTitle = "Halo", MinPlayers = 2 }, new Ladder { LadderID = 1, GameTitle = "Halo", MinPlayers = 4 } }; Ladder l = new Ladder { LadderID = 1, GameTitle = "Halo", MinPlayers = 4 }; _ladderSet.Object.AddRange(ladderdb); _ladderSet.Setup(o => o.Add(It.IsAny <Ladder>())).Callback((Ladder d) => ladderdb.Add(d)); ConnectMocksToDataStore(ladderdb); bool result = _repo.AddLadder(l); List <Ladder> actual = _repo.GetAllLadders(); CollectionAssert.AreEqual(expected, actual); }