public void Init() { var fileName = @"..\..\TestFiles\Run For The Next Generation 2011 001.JPG"; fakeDataSource = new FakeDataSource(); target = new PhotosController(fakeDataSource, provider); target.ControllerContext = new FakeControllerContext(); target.ControllerContext.Request = SetupContent(fileName); target.context = new FakeHttpContext(); }
public void Init() { fakeDataSource = new FakeDataSource(); var photoRecordList = ObjectMother.ReturnPhotoDataRecord(3); foreach (var photo in photoRecordList) { fakeDataSource.Photos.Add(photo); } fakeDataSource.SaveChanges(); target = new PhotosController(fakeDataSource, provider); }
public ValuesController(IPhotoDataSource Db) { _db = Db; }
public PhotosController(IPhotoDataSource Db, IStorageProvider storageProvider) { _db = Db; _storage = storageProvider; Trace.TraceInformation("Created PhotosController with {0}", storageProvider.GetType().ToString()); }