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
feat!: Remove EntryAssembly and ExecutingAssembly methods and refactor (#331)
* feat!: remove `EntryAssembly`/`ExecutingAssembly` source methods
`Assembly.GetExecutingAssembly()` is resolved inside the library (stack
crawl mark), so `In.ExecutingAssembly()` always returned the
aweXpect.Reflection assembly itself - never the caller's assembly.
`Assembly.GetEntryAssembly()` returns the test host (or `null`) under
test runners. Both made namespace-clarified architecture assertions
silently pass on empty collections in their primary use case.
Removes `In.EntryAssembly()`, `In.ExecutingAssembly()`,
`Types.InEntryAssembly()`, `Types.InExecutingAssembly()` and the
matching `InNamespaceResult` clarifiers.
Use `In.AssemblyContaining<T>()` / `Types.InAssemblyContaining<T>()`
instead, which resolve the assembly reliably from the type argument.
* refactor: reuse `In.Assemblies` in `InNamespaceResult.InAssemblies`
The clarifier inlined a byte-for-byte copy of the `In.Assemblies` body
(including the description string), the only one of the clarifiers not
delegating to `In.*`. Delegate to keep the description and null
handling from drifting between `Types.InAssemblies(...)` and
`Types.InNamespace(...).InAssemblies(...)`.
* refactor: collapse `InNamespaceResult` clarifiers into a shared helper
Each clarifier repeated `<source>.Types().WithinNamespace(_namespace)`.
The shared `From` helper makes the invariant structural: a future
clarifier cannot compile without re-applying the namespace filter.
* docs: align the `In` class summary with the `In`/`Types` split
The summary still read `Static entry point for assemblies.` although
`In` also selects types and members, and no longer covers selection by
criteria since `In.Namespace` moved to `Types.InNamespace`. Mirror the
README positioning: `In` starts from concrete reflection objects,
`Types` selects by criteria.
* style: add missing newline at end of `Types.cs`
* docs: document the mirroring contract between `In` and `Types`
Every criteria-based source exists in three places (`In.*`, `Types.In*`
and the `InNamespaceResult` clarifiers) that are only kept in sync
manually; note this on the `Types` class so a new source is not added
to one surface only.
0 commit comments