Exemplo n.º 1
0
        public void AddIdField_Should_Add_Id_To_The_Header()
        {
            // Arrange
            GenerateFiles generateFiles = new GenerateFiles(this.config, this.spreadsheet, this.fileSystem, this.outputWriter);

            Header header = new Header();

            // Act
            generateFiles.AddIdField(header);

            // Assert
            header.Fields.Find(f => f.Name == "id").Length.Should().Be(Constant.Key.ID_LENGHT);
        }
Exemplo n.º 2
0
        public void AddIdField_Should_Let_Header_Null_When_It_Is_Null()
        {
            // Arrange
            GenerateFiles generateFiles = new GenerateFiles(this.config, this.spreadsheet, this.fileSystem, this.outputWriter);

            Header header = null;

            // Act
            generateFiles.AddIdField(header);

            // Assert
            header.Should().BeNull();
        }