public void Create_InputDtoAddCategory_AreSame() { var input = new InputDtoAddCategory("Cardio"); _categoryFactory.CreateFromName(input.Name).Returns(new Category(input.Name)); var icategory = _categoryFactory.CreateFromName(input.Name); _categoryRepository.Query().Returns(getCategoryList()); _categoryRepository.Create(icategory).Returns(new Category(input.Name)); var res = _categoryService.Create(input); var expected = new OutputDtoAddCategory("Cardio"); Assert.AreEqual(expected, res); }
private bool Equals(OutputDtoAddCategory other) { return(Id == other.Id && Title == other.Title); }
protected bool Equals(OutputDtoAddCategory other) { return(Id == other.Id && Name == other.Name); }