public void CreateNewProject_WithCreateAssessmentSectionFuncReturnNull_ReturnsNull() { // Setup var projectFactory = new RiskeerProjectFactory(() => null); // Call IProject project = projectFactory.CreateNewProject(); // Assert Assert.IsNull(project); }
public void CreateNewProject_WithCreateAssessmentSectionFuncReturnAssessmentSection_ReturnsNewRiskeerProject() { // Setup var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); var projectFactory = new RiskeerProjectFactory(() => assessmentSection); // Call IProject project = projectFactory.CreateNewProject(); // Assert Assert.IsInstanceOf <RiskeerProject>(project); var riskeerProject = (RiskeerProject)project; Assert.AreSame(assessmentSection, riskeerProject.AssessmentSection); }