Commit 972f04f
Fix AccountDeleteInPostPlugin being auto-registered across all tests
The plugin extended Plugin directly, causing it to be discovered and
registered by the base type scanner for every test that updated an
account, deleting records in unrelated tests.
Fix:
- Change AccountDeleteInPostPlugin to extend TestPlugin (an intermediate
abstract class) instead of Plugin directly. The scanner uses
t.BaseType == basePluginType so transitively-inherited plugins are
not auto-discovered.
- Add missing #pragma warning disable CS0618 around RegisterPluginStep
(consistent with other test plugins, also fixes CodeFactor warning).
- Simplify test assertions to use already-imported QueryExpression types
instead of fully-qualified names.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 7b09c63 commit 972f04f
2 files changed
Lines changed: 7 additions & 4 deletions
File tree
- tests
- TestPluginAssembly365/Plugins
- XrmMockup365Test
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
0 commit comments