public void TestConstructionFromTemplate()
        {
            var id = Guid.NewGuid();
            var widgetConfiguration = new QuickInfoWidgetConfiguration();

            widgetConfiguration.Add(new QuickInfoViewConfiguration(id)
            {
                Name = "Cool entry"
            });
            var template = new WidgetTemplate
            {
                Configuration = widgetConfiguration
            };
            var analyser = new Mock <IDataSourceAnalyser>();
            var analyserConfiguration = new QuickInfoAnalyserConfiguration();

            analyserConfiguration.Add(new QuickInfoConfiguration(id)
            {
                FilterValue = "Foo"
            });
            analyser.Setup(x => x.Configuration).Returns(analyserConfiguration);

            var viewModel = new QuickInfoWidgetViewModel(template, analyser.Object);

            viewModel.QuickInfos.Should().HaveCount(1);
            var quickInfo = viewModel.QuickInfos.First();

            quickInfo.Should().NotBeNull();
            quickInfo.Id.Should().Be(id);
            quickInfo.Name.Should().Be("Cool entry");
            quickInfo.FilterValue.Should().Be("Foo");
        }
        public void TestRoundtripOneTitle()
        {
            var config = new QuickInfoWidgetConfiguration();
            var id     = Guid.NewGuid();

            config.Add(new QuickInfoViewConfiguration(id)
            {
                Name = "Version", Format = "Stuff {message}"
            });

            var actualConfig = config.Roundtrip(typeof(QuickInfoViewConfiguration));

            actualConfig.Should().NotBeNull();
            actualConfig.Titles.Should().HaveCount(1);
            actualConfig.Titles.First().Id.Should().Be(id);
            actualConfig.Titles.First().Name.Should().Be("Version");
            actualConfig.Titles.First().Format.Should().Be("Stuff {message}");
        }