Exemple #1
0
        public void getAlertsForASpecifiedUserTest()
        {
            Mock <IDatabaseQueryService> mockDBService = new Mock <IDatabaseQueryService>(MockBehavior.Strict);

            mockDBService.Setup(x => x.GetAllAlerts(1)).Returns(dbAlerts);
            AlertService alertService = new AlertService(mockDBService.Object,
                                                         new CameraService(mockDBService.Object, new GraphStatisticService(mockDBService.Object), new LocationService(mockDBService.Object)),
                                                         new NotificationService(mockDBService.Object));

            AlertDetails alertDetails = new AlertDetails(dbAlerts[0]);

            Assert.That(alertService.GetAllAlertsForUser(1)[0].AlertId, Is.EqualTo(1));
        }