コード例 #1
0
        public void TestCtor()
        {
            var model = new QuickInfoViewModel(_id, _viewConfig, _analyserConfig);

            model.Result.Should().BeNull();
            model.Value.Should().BeNull();
        }
コード例 #2
0
        public void TestFormat1()
        {
            _analyserConfig.MatchType = FilterMatchType.SubstringFilter;
            var model = new QuickInfoViewModel(_id, _viewConfig, _analyserConfig);

            model.Result = new QuickInfo.BusinessLogic.QuickInfo("Foobar");
            model.Value.Should().Be("Foobar", "because by default, the entire matched line shall be printed");
        }
コード例 #3
0
        public void TestSetNullValue()
        {
            _analyserConfig.MatchType = FilterMatchType.SubstringFilter;
            var model = new QuickInfoViewModel(_id, _viewConfig, _analyserConfig);

            model.Result = new QuickInfo.BusinessLogic.QuickInfo("Foobar");
            model.Result = null;
            model.Value.Should().Be("N/A", "because we haven't forwarded a result just yet");
        }
コード例 #4
0
        public void TestChangeFormat()
        {
            _analyserConfig.MatchType = FilterMatchType.SubstringFilter;
            var model = new QuickInfoViewModel(_id, _viewConfig, _analyserConfig);

            model.Result = new QuickInfo.BusinessLogic.QuickInfo("Foobar");
            model.Format = "Match: {message} Found!";
            model.Value.Should().Be("Match: Foobar Found!");

            model.Format = "{timestamp}";
            model.Value.Should().Be("N/A", "because the match doesn't include a timestamp");
        }
        public BoilerStatusListViewPage1()
        {
            InitializeComponent();

            BindingContext = viewModel = new QuickInfoViewModel();
        }