public AnimalSanctuaryController()
 {
     _image   = new ImageDBRepository();
     _animal  = new AnimalDBRepository();
     _sounds  = new SoundDBRepository();
     _profile = new ProfileDBRepository(System.Web.HttpContext.Current);
     _options = new OptionsDBRepository();
 }
Пример #2
0
        const int LOWEST_DIFF  = 1; //lowest diff level

        public PlayControllerTests()
        {
            _controller = new PlayController();
            _image      = new ImageDBRepository();
            _map        = new MapDBRepository();
            _progress   = new ProfileProgressDBRepository();
            _minigame   = new MiniGamesDBRepository();
            _options    = new OptionsDBRepository();
        }
        public void ShowAnimalImageTest()
        {
            AnimalDBRepository _animal = new AnimalDBRepository();
            ImageDBRepository  _image  = new ImageDBRepository();
            int AnimalID        = 2;
            int expectedImageID = 8;

            Animal animal = _animal.Get(AnimalID);      //get animal from database
            Images image  = _image.Get(animal.ImageID); //get animal image from database

            Assert.AreEqual(expectedImageID, image.ID);
        }