public void TestAlertServiceUsesSameObj()
        {
            AlertService alrtservc = new AlertService(new AlertDAO());
            var          tuple     = alrtservc.RaiseAlert();

            Assert.AreEqual(true, tuple.Item2 == alrtservc.GetAlertTime(tuple.Item1), $"expected {tuple.Item2 } not equal to {alrtservc.GetAlertTime(tuple.Item1)}");
        }
Exemple #2
0
    static void Main(string[] args)
    {
        IAlertDAO    alertDao = new AlertDAO();
        AlertService alert    = new AlertService(alertDao);
        Guid         id       = alert.RaiseAlert();

        Console.WriteLine(alert.GetAlertTime(id));
        Console.ReadKey();
    }
        public void AlertService_GetAlertTime()
        {
            // Arrange.
            IAlertDAO    alertDAO     = new AlertDAO();
            AlertService alertService = new AlertService(alertDAO);

            // Act.
            alertService.RaiseAlert();
            alertService.GetAlertTime(Guid.NewGuid());

            // Assert.
        }