Пример #1
0
 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();
 }
Пример #2
0
        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();
        }
Пример #3
0
 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);
 }
Пример #4
0
        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);
        }
Пример #5
0
 public ValuesController(IPhotoDataSource Db)
 {
     _db = Db;
 }
Пример #6
0
 public PhotosController(IPhotoDataSource Db, IStorageProvider storageProvider)
 {
     _db      = Db;
     _storage = storageProvider;
     Trace.TraceInformation("Created PhotosController with {0}", storageProvider.GetType().ToString());
 }
Пример #7
0
 public PhotosController(IPhotoDataSource Db, IStorageProvider storageProvider)
 {
     _db = Db;
     _storage = storageProvider;
     Trace.TraceInformation("Created PhotosController with {0}", storageProvider.GetType().ToString());
 }
Пример #8
0
 public ValuesController(IPhotoDataSource Db)
 {
     _db = Db;
 }