/// <summary> /// Given certain conditions. /// </summary> protected override void Given() { this.databaseRecords = new[] { new Data.Entities.RadioStation(), new Data.Entities.RadioStation(), new Data.Entities.RadioStation() }; this.repositoryMock.Setup(a => a.GetAll()).Returns(databaseRecords); this.mapperMock.Setup(a => a.Map(this.databaseRecords[0])).Returns(new RadioStation { Country = "UK", Name = "Radio BBC 1" }); this.mapperMock.Setup(a => a.Map(this.databaseRecords[1])).Returns(new RadioStation { Country = "Poland", Name = "Radio Plus" }); this.mapperMock.Setup(a => a.Map(this.databaseRecords[2])).Returns(new RadioStation { Country = "France", Name = "NRJ" }); classUnderTest = new GetRadioStationsDirector(this.repositoryMock.Object, this.mapperMock.Object); }