private static void AddTitle(Test test, Application.Models.Spreadsheet.Metadata metadata, ISpreadsheetWriter spreadsheetWriter)
        {
            var titleBlock = new TitleBlock(spreadsheetWriter.CurrentPosition,
                                            test.Name,
                                            metadata.Created,
                                            metadata.ApplicationVersion);

            titleBlock
            .Write(spreadsheetWriter);
        }
Ejemplo n.º 2
0
        public void Write_WithTitle_PutsTitleOnRightPosition()
        {
            // Arrange
            var expectedTitle              = _fixture.Create <Name>();
            var expectedCreatedOn          = _fixture.Create <DateTime>();
            var expectedApplicationVersion = _fixture.Create <string>();
            var sut = new TitleBlock(_startpoint, expectedTitle, expectedCreatedOn, expectedApplicationVersion);

            // Act
            sut.Write(_spreadsheetWriter);

            // Assert
            _spreadsheet[0, 0].Should().Be(expectedTitle.Value);
        }
Ejemplo n.º 3
0
        public void Write_WithCreatedOn_PutsCreatedOnOnRightPosition()
        {
            // Arrange
            var expectedTitle              = _fixture.Create <Name>();
            var expectedCreatedOn          = _fixture.Create <DateTime>();
            var expectedApplicationVersion = _fixture.Create <string>();
            var sut = new TitleBlock(_startpoint, expectedTitle, expectedCreatedOn, expectedApplicationVersion);

            // Act
            sut.Write(_spreadsheetWriter);

            // Assert
            _spreadsheet[0, 1].Should().Be("Gemaakt op:");
            _spreadsheet[1, 1].Should().Be(expectedCreatedOn.ToString("dd-MM-yyyy"));
        }