Skip to content

Commit ed9bfee

Browse files
committed
Document InternalsVisibleTo ban so Copilot knows
1 parent b275911 commit ed9bfee

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
* Design APIs to be highly testable, and all functionality should be tested.
1111
* Avoid introducing binary breaking changes in public APIs of projects under `src` unless their project files have `IsPackable` set to `false`.
12+
* `InternalsVisibleTo` attributes are *not allowed*.
1213

1314
## Testing
1415

@@ -17,6 +18,8 @@
1718
* There should generally be one test project (under the `test` directory) per shipping project (under the `src` directory). Test projects are named after the project being tested with a `.Tests` suffix.
1819
* Tests use xunit v3 with Microsoft.Testing.Platform (MTP v2). Traditional VSTest `--filter` syntax does NOT work.
1920
* Some tests are known to be unstable. When running tests, you should skip the unstable ones by using `-- --filter-not-trait "FailsInCloudTest=true"`.
21+
* Since `InternalsVisibleTo` is not allowed, testing must be done at the public API level.
22+
In rare cases where there are static utility methods that need to be thoroughly tested, which may be impossible or inefficient to do via public APIs, the static methods may be moved to a .cs file that is then linked both into the product and into the test project so that it may be tested directly.
2023

2124
### Running Tests
2225

0 commit comments

Comments
 (0)