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

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 17, 2025, 10:38