public async Task CanInsertMessage() { ClearPushMessages(); DateTime date = DateTime.UtcNow; await _pushNotificationsService.InsertPushMessage(new PushMessage { NumberOfReceivers = 1, SentOn = date, Text = "CanInsertMessageText", Title = "CanInsertMessageTitle" }); var found = _messageRepository.Table.Where(x => x.Text == "CanInsertMessageText").FirstOrDefault(); Assert.AreNotEqual(null, found); Assert.AreEqual("CanInsertMessageText", found.Text); Assert.AreEqual("CanInsertMessageTitle", found.Title); Assert.AreEqual(date.Date, found.SentOn.Date); }