Example #1
0
        public void FromSettings_WhenNoNotifiersConfigured_LogsWarning()
        {
            var example = NimatorSettings.GetExample();

            example.Notifiers = new NotifierSettings[0];
            var result = Nimator.FromSettings(loggerMock.Object, example.ToJson());

            loggerMock.Verify(l => l.Warn(It.Is <string>(s => s != null && s.ToLowerInvariant().Contains("notifiers"))));
        }
Example #2
0
        public void FromSettings_WhenGivenExampleAsJson_ReturnsNimator()
        {
            // Bit of a smoke test, but better than nothing...
            var example = NimatorSettings.GetExample();
            var json    = example.ToJson();
            var result  = Nimator.FromSettings(loggerMock.Object, json);

            Assert.That(result, Is.Not.Null);
        }