public void CreateDecisionTest() { _decisionService = CreateDecisionService(); _repository.Setup(rep => rep.DecesionTarget.GetAllAsync(It.IsAny <Expression <Func <DecesionTarget, bool> > >(), It.IsAny <Func <IQueryable <DecesionTarget>, IIncludableQueryable <DecesionTarget, object> > >())) .ReturnsAsync(GetTestDecisionTargetsQueryable); var decision = _decisionService.CreateDecision(); Assert.IsType <DecisionWrapperDTO>(decision); }
public void CreateDecisionTest_ReturnsNewDecision() { //Arrange _repository.Setup(rep => rep.DecesionTarget.GetAllAsync(It.IsAny <Expression <Func <DecesionTarget, bool> > >(), It.IsAny <Func <IQueryable <DecesionTarget>, IIncludableQueryable <DecesionTarget, object> > >())) .ReturnsAsync(GetTestDecisionTargetsQueryable); //Act var decision = _decisionService.CreateDecision(); //Assert Assert.IsNotNull(decision); Assert.IsInstanceOf <DecisionWrapperDTO>(decision); }