public void TestAdd()
        {
            SingleDataSource source = _dataSources.AddDataSource(@"E:\Code\test.log");

            source.Should().NotBeNull();
            source.FullFileName.Should().Be(@"E:\Code\test.log");
            source.FollowTail.Should().BeFalse();
            source.Id.Should().NotBe(Guid.Empty, "Because a newly added data source should have a unique id");

            _settings.Count.Should().Be(1);
            _settings[0].File.Should().Be(@"E:\Code\test.log");
        }
Exemple #2
0
        public void TestAddChild1()
        {
            var model = new MergedDataSourceViewModel(_dataSources.AddGroup(), _actionCenter.Object);
            SingleDataSource source = _dataSources.AddDataSource("foo");
            var sourceViewModel     = new SingleDataSourceViewModel(source, _actionCenter.Object);

            model.AddChild(sourceViewModel);
            model.Observable.Should().Equal(sourceViewModel);
            sourceViewModel.Parent.Should().BeSameAs(model);
        }