public void Method_Add_Returns_Not_Empty_Guid()
        {
            var  storage = new SqlServerReminderStorage(_connectionString);
            Guid actual  = storage.Add(new Core.ReminderItemRestricted
            {
                ContactId = "TestContact",
                Date      = DateTimeOffset.Now.AddHours(1),
                Message   = "test",
                Status    = Core.ReminderItemStatus.Awaiting
            });

            Assert.AreNotEqual(Guid.Empty, actual);
        }
Ejemplo n.º 2
0
        public void Add_Returns_Non_Empty_Guid()
        {
            var storage = new SqlServerReminderStorage(_connectionString);
            var item    = new ReminderItemRestricted(
                DateTimeOffset.MinValue,
                "message",
                "contactId",
                ReminderItemStatus.ReadyToSend);

            Guid actual = storage.Add(item);

            Assert.AreNotEqual(Guid.Empty, actual);
        }
Ejemplo n.º 3
0
        public void Get_Returns_ReminderItem()
        {
            var storage = new SqlServerReminderStorage(_connectionString);
            var item    = new ReminderItemRestricted(
                DateTimeOffset.MinValue,
                "message",
                "contactId",
                ReminderItemStatus.ReadyToSend);

            Guid actualId   = storage.Add(item);
            var  testedItem = storage.Get(actualId);

            Assert.AreEqual(item.Status, testedItem.Status);
            Assert.AreEqual(item.ContactId, testedItem.ContactId);
            Assert.AreEqual(item.Message, testedItem.Message);
            Assert.AreEqual(item.Date, testedItem.Date);
        }