public void WhenEventIsNotSupportedThenErrorIsThrown()
        {
            var provider = new Mock <IPushMessageResourceProvider>();

            var factory = new PushMessageFactory(provider.Object);

            Assert.Throws <InvalidOperationException>(() => factory.Create(new NotificationMessage
            {
                Event = NotificationEvent.PackageArrived
            }, new UserSettings()));
        }
        public void WhenEventIsSupportedThenMessageReturned()
        {
            var provider        = new Mock <IPushMessageResourceProvider>();
            var supportedEvents = NotificationEventConfiguration.Config[NotificationType.Push];

            var factory = new PushMessageFactory(provider.Object);

            foreach (var ev in supportedEvents)
            {
                var message = factory.Create(new NotificationMessage
                {
                    Parameters = new Dictionary <string, object>(),
                    Event      = ev.Event
                }, new UserSettings());

                Assert.NotNull(message);
            }
        }