public void Then_Fields_Are_Set_To_Expected_Values()
 {
     _result.Should().NotBeNull();
     System.IO.Path.GetFileNameWithoutExtension(_result.FileName)
     .Should().Be("CompanyName_opportunities_10Mar2019");
     System.IO.Path.GetExtension(_result.FileName)
     .Should().Be(".xlsx");
     _result.ContentType
     .Should().Be("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
 }
コード例 #2
0
        public async Task ShouldReturnExistingFile(File file)
        {
            // Act
            await AddAsync(file);

            FileDownloadDto fileDto = await SendAsync(new DownloadFileQuery { Id = file.Id });

            // Assert
            fileDto.Should().NotBeNull();
            fileDto.Name.Should().Be(file.Name);
            fileDto.ContentType.Should().Be(file.ContentType);
            fileDto.Content.Should().Equal(file.Content);
        }