🧪 Add test for GetManufacturer in Identification.cs - #20
Conversation
- Added NUnit test project for OpenHardwareMonitorLib. - Added comprehensive unit tests for `Identification.GetManufacturer`. - Fixed missing `ABIT` mapping in `GetManufacturer`. - Exposed internal library classes to test project via `InternalsVisibleTo`. - Fixed C# 7.3 constraint compiler error (`where T : Delegate` to `where T : class`) in `NVML.cs`. - Included the test project in the root solution file. Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
PR #20 committed MSBuild output into the repo — bin/Debug and obj/Debug DLLs, generated .cs, FilesWrittenAbsolute manifests, TestResult.xml, and two build-copied WinRing0*.sys kernel drivers. They slipped in because .gitignore had `Bin/` and `Obj/` capitalised while the projects emit lowercase `bin/` and `obj/`, and Git path matching is case-sensitive. - .gitignore: match both cases via [Bb]in/ and [Oo]bj/, and add TestResult.xml and app/target/ (the Rust build dir, previously untracked only by luck). - git rm --cached the 15 artifacts. Files stay on disk; they're just no longer tracked. The canonical drivers at Hardware/WinRing0.sys and Hardware/WinRing0x64.sys are untouched — the removed obj/Debug ones were build-time copies of those. Checked-in kernel-driver binaries are exactly what trips security scanners, so this is worth removing rather than leaving. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🎯 What: The testing gap addressed
The
GetManufacturermethod inHardware/Mainboard/Identification.cs(a critical mapping mechanism for mainboard names) lacked automated tests. Additionally, the"ABIT"missing cases were resolved to ensure full accuracy.📊 Coverage: What scenarios are now tested
Tests evaluate known OEM mapping (e.g. Acer, Gigabyte, MSI), legacy names ("ABIT", "abit"), specific exclusion names ("To be filled by O.E.M."), empty strings, null values, and arbitrary unknown string entries.
✨ Result: The improvement in test coverage
The method's logic has been formally guarded against regressions. Furthermore, internal accessibility structures have been laid using
[InternalsVisibleTo]allowing for future internal library components to be seamlessly tested.PR created automatically by Jules for task 14469942845234752010 started by @manupawickramasinghe