Example #1
0
        public void ExecuteMethodTest()
        {
            //Arrange
            var pipelineMediator = new Mock <IPipelineMediator>();
            var restClient       = new Mock <IEncodeRestClient>();
            var pipelineStep     = new StartPipelineStep(pipelineMediator.Object, restClient.Object);

            restClient.Setup(m => m.GetTask()).Returns(new TaskData()
            {
                TypeOfTask = TypeOfTask.Encode
            });

            //Act
            pipelineStep.Execute();

            //Assert
            pipelineMediator.Verify(m => m.Send(It.IsAny <EncodeStepData>()), Times.Once());
        }
        public void ExecuteMethodTest()
        {
            //Arrange
            var pipelineMediator = new Mock<IPipelineMediator>();
            var restClient = new Mock<IEncodeRestClient>();
            var pipelineStep = new StartPipelineStep(pipelineMediator.Object, restClient.Object);

            restClient.Setup(m => m.GetTask()).Returns(new TaskData()
                                                           {
                                                               TypeOfTask = TypeOfTask.Encode
                                                           });

            //Act
            pipelineStep.Execute();

            //Assert
            pipelineMediator.Verify(m=>m.Send(It.IsAny<EncodeStepData>()), Times.Once());
        }