コード例 #1
0
ファイル: AlertesTests.cs プロジェクト: maxaug999/Gotham
        private void une_alerte()
        {
            //TODO : Mettre l'application en mode Mocks et aller chercher un joueur dans le Mock
            var mockRepo = new MockAlertesRepository();

            _alerte = mockRepo.GetById(1).Result;
        }
コード例 #2
0
            private async void Un_alerte()
            {
                var mockRepo = new MockAlertesRepository();
                var alertes  = await mockRepo.GetAll();

                _alerte = alertes.First();
            }
コード例 #3
0
        public async Task Test_Index_Model_Is_An_Enumerable_Model_Of_Joueurs()
        {
            var mockRepo   = new MockAlertesRepository();
            var controller = new AlertesController(mockRepo);

            var result = await controller.Index() as ViewResult;

            Assert.IsAssignableFrom <IEnumerable <Alerte> >(result.ViewData.Model);
        }
コード例 #4
0
        public async Task Test_Index_Returns_A_ViewResult()
        {
            var mockRepo   = new MockAlertesRepository();
            var controller = new AlertesController(mockRepo);

            var result = await controller.Index();

            Assert.IsType <ViewResult>(result);
        }
コード例 #5
0
 public TestAlertesController()
 {
     mockRepo   = new MockAlertesRepository();
     controller = new AlertesController(mockRepo);
 }
コード例 #6
0
 public AlertesUnitTests()
 {
     //Arrange
     _mockRepo          = new MockAlertesRepository();
     _alertesController = new AlertesController(_mockRepo);
 }