private static void AddColumnsToCheckList(CheckedListBox checkList, RowCollection rowCollection)
 {
     foreach (var columnHeader in rowCollection.GetColumnHeaders())
     {
         checkList.Items.Add(columnHeader);
     }
 }
        public void Load(ComparerArguments comparerArguments)
        {
            var sourceReader =
                _fileReaderFactory.CreateFromFileName(new FileInfoWrapper(new FileInfo(comparerArguments.SourceFilePath)));
            var targetReader =
                _fileReaderFactory.CreateFromFileName(new FileInfoWrapper(new FileInfo(comparerArguments.TargetFilePath)));

            _sourceRowCollection = sourceReader.Read(comparerArguments.SourceFileTabIndex);
            _targetRowCollection = targetReader.Read(comparerArguments.TargetFileTabIndex);

            _view.SourceColumns = _sourceRowCollection.GetColumnHeaders();
            _view.TargetColumns = _targetRowCollection.GetColumnHeaders();
            _view.Show();
        }
        public void Then_returns_expected_Headers()
        {
            var rowCollection = new RowCollection(new List<Row>
            {
                new Row
                {
                    new Column("Test", "Test"),
                    new Column("Foo", "Bar"),
                    new Column("Abc", "Def")
                }
            });

            var expectedHeaders = new List<string> { "Test", "Foo", "Abc" };

            rowCollection.GetColumnHeaders().ShouldAllBeEquivalentTo(expectedHeaders);
        }
Exemplo n.º 4
0
        public void Then_returns_expected_Headers()
        {
            var rowCollection = new RowCollection(new List <Row>
            {
                new Row
                {
                    new Column("Test", "Test"),
                    new Column("Foo", "Bar"),
                    new Column("Abc", "Def")
                }
            });

            var expectedHeaders = new List <string> {
                "Test", "Foo", "Abc"
            };

            rowCollection.GetColumnHeaders().ShouldAllBeEquivalentTo(expectedHeaders);
        }
        public void Given_empty_collection_Then_returns_empty_Headers_list()
        {
            var rowCollection = new RowCollection(new List<Row>());

            rowCollection.GetColumnHeaders().Should().BeEmpty();
        }
Exemplo n.º 6
0
        public void Given_empty_collection_Then_returns_empty_Headers_list()
        {
            var rowCollection = new RowCollection(new List <Row>());

            rowCollection.GetColumnHeaders().Should().BeEmpty();
        }