public ContactHandlerTest()
        {
            IList <Contact> contacts = new List <Contact>
            {
                new Contact()
                {
                    FullName = "Jan K", Id = 123, User = "******"
                }
            };

            var contactsMock = DbSetHelper.CreateDbSetMock(contacts);

            var dataContextMock = new Mock <DataContext>();

            dataContextMock.Setup(x => x.Contacts).Returns(contactsMock.Object);

            contactsHandler = new ContactsHandler(dataContextMock.Object);
        }
        public MessageHandlerTest()
        {
            IList <Message> messages = new List <Message>
            {
                new Message
                {
                    Id   = 1, MessageDateTime = DateTime.MinValue, Text = "Hello",
                    User = new Contact {
                        FullName = "Jan K", Id = 123, User = "******"
                    }
                }
            };

            var messageMock = DbSetHelper.CreateDbSetMock(messages);

            var dataContextMock = new Mock <DataContext>();

            dataContextMock.Setup(x => x.Messages).Returns(messageMock.Object);

            messageHandler = new MessageHandler(dataContextMock.Object);
        }