Open Closed

Use The Object Mapper in Unit Test #8307


User avatar
0
MustafaAbuzaid created
  • ABP Framework version: v8.3.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: Every implementation in service uses object mapper unit test's substitute returning null EX: promotionExam = _objectMapper.Map(request, promotionExam);
  • Steps to reproduce the issue: Create a Substitute for Object Mapper in Unit Test

1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Because the ObjectMapper is mocked, don't have any features. It is reasonable to return a null result. I think this is has nothing to do with ABP

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09