Ejemplo n.º 1
0
        private void GenerateReport_IsSuccessfullyCreated_UnitTest(bool isSingleFileProject, bool isChecked, string projectName)
        {
            var projects            = new BindingList <ProjectDetails>();
            var projectDetails      = _exportReportsConfiguration.GetProjectDetails(isSingleFileProject, projectName);
            var optionalInformation = _exportReportsConfiguration.GetOptionalInformation();

            projects.Add(projectDetails);

            var isReportGenerated = _reportService.GenerateReportFile(projects, optionalInformation, _exportTempFolder, isChecked);

            Assert.True(isReportGenerated);
        }
        private void SetProjectLanguages_IsSuccessfullySet_UnitTest(bool isSingleFileProject, string projectName, bool isChecked, string languageName)
        {
            // Arrange
            var projectDetails = new List <ProjectDetails>();

            projectDetails.Add(_exportReportsConfiguration.GetProjectDetails(isSingleFileProject, projectName));

            // Act
            _projectService.SetProjectLanguages(projectDetails, isChecked, languageName);
            var isLanguageChecked = projectDetails[0]?.ProjectLanguages[languageName];

            // Assert
            Assert.True(isLanguageChecked);
        }