Replies: 5 comments 2 replies
-
To be honest, I’m having difficulty understanding how you envision the proposed code structure. Could you provide a small working example to demonstrate your approach? Using the existing unit tests as a basis for comparison would be perfectly fine. It is to compare the existing solution with your suggestion. I’m absolutely open to improvements, but since I don’t fully grasp how you intend to organize or structure the code, I’m unable to provide a clear answer at this point. |
Beta Was this translation helpful? Give feedback.
-
@biwiki , I moved our discussion here to merge your fix. |
Beta Was this translation helpful? Give feedback.
-
Nah, it is all about the testing, ie how to create mock interfaces. There is nothing to do with the code structure |
Beta Was this translation helpful? Give feedback.
-
Hi @biwiki, Ah, I think I’m starting to understand your point, thank you for clarifying! 😊 Mocking is indeed a powerful tool, and I agree that it would be great to have. If not in the current version, it’s certainly worth considering for future updates. To be honest, I don’t yet have enough experience with mocking to manage it effectively. I’d need to either learn more or seek help to get started. In previous projects where we used mocked interfaces, we typically relied on a dedicated library with testing / mocking utilities containing commonly used platform or framework specific mocked objects. For example, with the AREG framework, this might include objects like If you know more practical or straightforward approach to mocking or writing unit tests, I’d greatly appreciate it if you could share. I would be happy to learn! |
Beta Was this translation helpful? Give feedback.
-
I created a simple mock class for implementing os functions under NESocket in this PR #486 |
Beta Was this translation helpful? Give feedback.
-
Originally posted by @biwiki in #483 (comment)
Beta Was this translation helpful? Give feedback.
All reactions