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
    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

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on January 09, 2026, 07:22
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.