示例#1
0
        public void CreateBikeColorIfNotExists_Calls_CreateColor_In_Service()
        {
            mockMapper.Setup(m => m.Map <BikeColorDto>(It.IsAny <CreateBikeColorRequest>())).Returns(new BikeColorDto());
            mockService.Setup(r => r.CreateColorIfNotExists(It.IsAny <BikeColorDto>())).Returns(new BikeColorDto());
            colorController.CreateBikeColorIfNotExists(new CreateBikeColorRequest());

            mockService.Verify(s => s.CreateColorIfNotExists(It.IsAny <BikeColorDto>()), Times.Once);
        }