public void AddLabel_InValidData() { LabelEntity labelEntity = null; LabelDTO labelDTO = null; _mapper.Setup(p => p.Map <LabelDTO, LabelEntity>(labelDTO)).Returns(labelEntity); _repo.Setup(p => p.Add(labelEntity)).Returns(0); var returnObj = labelService.AddLabel(labelDTO); Assert.IsTrue(returnObj == null); }
public BaseResponse AddLabel(Label label) { var result = _labelService.AddLabel(label, 0); return(new OkResponse(result)); }