public void GetAllWorkflowTest() { initData(); List <Workflow> workflow = new List <Workflow>(); workflow = null; _workflows.Add(flow1); WorkflowDaoMock.Setup(f => f.GetAll()).Returns(workflow); WorkflowService impl = new WorkflowService(WorkflowDaoMock.Object, StepDaoMock.Object); viewData = impl.GetAllWorkflow(); Assert.AreEqual(FAIL, viewData.StatusCode); WorkflowDaoMock.Setup(f => f.GetAll()).Returns(_workflows); WorkflowService _impl = new WorkflowService(WorkflowDaoMock.Object, StepDaoMock.Object); viewData = _impl.GetAllWorkflow(); Assert.AreEqual(SUCCESS, viewData.StatusCode); Assert.AreEqual(1, viewData.GetData().Count); }