Ejemplo n.º 1
0
        public MockDb()
        {
            _movies = new List <Movie>()
            {
                new Movie("Tango & Cash", 4.99m, "MS9E0"),
                new Movie("Rocky", 4.99m, "DS0B3"),
                new Movie("8 Mile", 4.99m, "U8SF8")
            };

            Dvds = new DvdCollection(_movies.SelectMany(m => {
                return(Enumerable.Repeat(new Dvd(m.ImdbId), 3));
            }));
        }
Ejemplo n.º 2
0
 public void Repopulate(IEnumerable <MockDvdData> data)
 {
     _movies = new List <Movie>(data.Select(d => d.Movie));
     Dvds    = new DvdCollection(data.SelectMany(d => d.Dvds));
 }