public void Create_InputDtoAddUnit_AreSame() { var input = new InputDtoAddUnit("km"); _unitFactory.CreateFromType(input.Type).Returns(new Unit(input.Type)); var iunit = _unitFactory.CreateFromType(input.Type); _unitRepository.Query().Returns(getUnitList()); _unitRepository.Create(iunit).Returns(new Unit(input.Type)); var res = _unitService.Create(input); var expected = new OutputDtoAddUnit("km"); Assert.AreEqual(expected, res); }
protected bool Equals(OutputDtoAddUnit other) { return(Type == other.Type); }