Beispiel #1
0
        public void Should_ExportSprintToPng()
        {
            //arrange
            IExportHandler exportHandler = new PngExportHandler();
            Mock <Project> project       = new Mock <Project>(exportHandler)
            {
                CallBase = true
            };

            //act
            project.Object.GenerateReport();

            //assert
            Assert.IsType <PngExportHandler>(project.Object.ExportHandler);
            project.Verify(x => x.GenerateReport(), Times.Exactly(1));
        }
Beispiel #2
0
        public void Should_ExportSprintToPng()
        {
            //arrange
            SprintStateActive sprintState   = new SprintStateActive();
            IExportHandler    exportHandler = new PngExportHandler();
            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));
        }