public void WhenGettingExtraConnections_GetsExtraConnections() { CarLogic logic = new CarLogic(); logic.SetRepositoryInterface(this.mockedRepository.Object); var result = logic.ListConnectionLogic(); Assert.That(result.Count(), Is.EqualTo(3)); Assert.That(result.SingleOrDefault(x => x.id == 3), Is.Not.Null); }