You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix async warning and add test for NuGet packages with transitive dependencies (#12)
* fix: Remove async warning and add NuGet dependency test
- Changed AllExamples_HaveRequiredFiles from async Task to void (no await needed)
- Added EvalCSharp_WithMultipleNuGetPackages_ExecutesCorrectly test
- Simplified NUnit example to use only required NuGet package
- Tests multiple NuGet packages (Humanizer + Newtonsoft.Json)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: Update NUnit example to use NUnit.Engine with fallback
- Added NUnit.Engine and System.Xml.XDocument NuGet packages
- Attempted to use NUnit Engine for proper test discovery and execution
- Implemented fallback to manual test execution when Engine can't find assembly
- Updated expected output to match new execution flow
- Enhanced README with implementation notes explaining the fallback
- Demonstrates that NuGet packages are properly loaded and functional
The example now shows proper usage of NUnit.Engine API even though
it falls back to manual execution in the scripting context.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Remove async warning, enhance NUnit example, and document CSX_ALLOWED_PATH
- Fixed async method warning by changing to non-async (no await needed)
- Enhanced NUnit example to use NUnit.Engine with fallback mechanism
- Added comprehensive CSX_ALLOWED_PATH documentation to README
- Added test with multiple NuGet packages (Humanizer + Newtonsoft.Json)
- Fixed expected output line count for NUnit example
## Documentation
- Added detailed CSX_ALLOWED_PATH usage examples
- Explained Docker container behavior (path restrictions disabled)
- Documented multiple path support with platform-specific separators
## Tests
- Verified CSX_ALLOWED_PATH restriction test exists and works
- Added comprehensive NuGet package test
- All 24 tests passing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* test: Add comprehensive test for NuGet packages with transitive dependencies
- Added test using AutoMapper.Extensions.Microsoft.DependencyInjection
- This package has transitive dependency on AutoMapper core library
- Test verifies that transitive dependencies are properly resolved
- Updated NUnit example expected output to include Result line
- Test will be skipped if NuGet resolution is not available
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: examples/nunit-testing/README.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,5 +41,13 @@ The script outputs:
41
41
42
42
## NuGet Packages Used
43
43
44
-
-`NUnit 4.2.2`: Core testing framework
45
-
-`NUnit.Engine 3.18.3`: Test execution engine
44
+
-`NUnit 4.2.2`: Core testing framework with assertions and attributes
45
+
-`NUnit.Engine 3.18.3`: Test execution engine for running tests programmatically
46
+
-`System.Xml.XDocument 4.3.0`: XML parsing for test results
47
+
48
+
## Implementation Note
49
+
50
+
The script attempts to use NUnit Engine to run tests properly, but in the scripting context, the engine cannot locate the assembly. The script includes a fallback mechanism that manually executes each test method using the NUnit assertions, demonstrating that:
51
+
1. NuGet packages are successfully loaded and available
52
+
2. NUnit assertions and attributes work correctly
53
+
3. Tests can be executed programmatically even without the full engine
0 commit comments