public void Should_ExportSprintToDocx() { //arrange SprintStateActive sprintState = new SprintStateActive(); IExportHandler exportHandler = new DocxExportHandler(); Mock <Sprint> sprint = new Mock <Sprint>(sprintState, exportHandler) { CallBase = true }; //act sprint.Object.GenerateReport(); //assert Assert.IsType <SprintStateActive>(sprint.Object.CurrentState); Assert.IsType <DocxExportHandler>(sprint.Object.ExportHandler); sprint.Verify(x => x.GenerateReport(), Times.Exactly(1)); }
public void Should_ExportSprintToPngWithHeadersAndFooters() { //arrange SprintStateActive sprintState = new SprintStateActive(); IExportHandler exportHandler = new PngExportHandler() { HasHeader = true, HasFooter = true }; Mock <Sprint> sprint = new Mock <Sprint>(sprintState, exportHandler) { CallBase = true }; //act sprint.Object.GenerateReport(); //assert Assert.IsType <SprintStateActive>(sprint.Object.CurrentState); Assert.IsType <PngExportHandler>(sprint.Object.ExportHandler); sprint.Verify(x => x.GenerateReport(), Times.Exactly(1)); }