@@ -41,6 +41,8 @@ Legend: ✅ dedicated assertion · ⚠️ only via a general mechanism (selector
4141| ** Type** : member presence by signature | ✅ | ⚠️ |
4242| ** Type** : operator presence (by kind) | ⚠️ | ✅ |
4343| ** Type** : conversion operators by signature | ✅ | ✅ |
44+ | ** Type** : immutability / member nullability | ❌ | ✅ |
45+ | ** Type** : dependencies (on / only on / outside an allowed set) | ❌ | ✅ |
4446| ** Method** : virtual / async / return type | ✅ | ✅ |
4547| ** Method** : static / abstract / sealed / generic / extension / operator | ❌ | ✅ |
4648| ** Method** : override | ❌ | ✅ |
@@ -50,9 +52,10 @@ Legend: ✅ dedicated assertion · ⚠️ only via a general mechanism (selector
5052| ** Property** : readable / writable | ✅ | ✅ |
5153| ** Property** : virtual | ✅ | ✅ |
5254| ** Property** : static / abstract / required / indexer / init-setter / override | ❌ | ✅ |
55+ | ** Property** : nullable | ❌ | ✅ |
5356| ** Property** : return / declared type | ✅ | ✅ |
5457| ** Constructor** : dedicated assertions / filtering | ⚠️ | ✅ |
55- | ** Field** : assertions | ❌ | ✅ |
58+ | ** Field** : assertions (static / read-only / constant / required / nullable) | ❌ | ✅ |
5659| ** Event** : assertions | ❌ | ✅ |
5760
5861The sections below detail each target with side-by-side examples.
@@ -91,7 +94,7 @@ await Expect.That(In.AllLoadedAssemblies()).HaveName("System").AsPrefix();
9194
9295- ** FluentAssertions** (` TypeAssertions ` ): ` Be<T> ` /` NotBe<T> ` , ` BeAssignableTo<T> ` , ` Implement<T> ` /` NotImplement<T> ` , ` BeDerivedFrom<T> ` , ` BeAbstract ` /` BeSealed ` /` BeStatic ` , ` HaveAccessModifier(CSharpAccessModifier) ` , ` BeDecoratedWith<T> ` (with attribute predicate and ` OrInherit ` variants), member presence (` HaveProperty ` /` HaveMethod ` /` HaveConstructor ` /` HaveIndexer ` /` HaveExplicit* ` ), and conversion operators. Type * kind* is available only as a selector filter (` ThatAreClasses() ` ), and namespace
9396 only on the selector (` BeInNamespace ` ); a single type's name/namespace use the string API.
94- - ** aweXpect.Reflection** : type-kind assertions (` IsAClass ` , ` IsAnInterface ` , ` IsAnEnum ` , ` IsAStruct ` , ` IsARecord ` , ` IsARecordStruct ` , ` IsARefStruct ` , ` IsADelegate ` , ` IsAnAttribute ` , ` IsAnException ` ), ` IsAbstract ` /` IsSealed ` /` IsStatic ` /` IsReadOnly ` /` IsNested ` /` IsGeneric ` /` IsInstantiable ` , access modifiers (` IsPublic ` , …), ` InheritsFrom<T>().Directly() ` , ` HasName ` , ` HasNamespace ` /` IsWithinNamespace ` , ` Has<TAttribute> ` , quantified member containment (` ContainsMethods() ` , …), operator presence by
97+ - ** aweXpect.Reflection** : type-kind assertions (` IsAClass ` , ` IsAnInterface ` , ` IsAnEnum ` , ` IsAStruct ` , ` IsARecord ` , ` IsARecordStruct ` , ` IsARefStruct ` , ` IsADelegate ` , ` IsAnAttribute ` , ` IsAnException ` ), ` IsAbstract ` /` IsSealed ` /` IsStatic ` /` IsReadOnly ` /` IsNested ` /` IsGeneric ` /` IsInstantiable ` / ` IsImmutable ` , access modifiers (` IsPublic ` , …), ` InheritsFrom<T>().Directly() ` , ` HasName ` , ` HasNamespace ` /` IsWithinNamespace ` , ` Has<TAttribute> ` , quantified member containment (` ContainsMethods() ` , …), member nullability ( ` OnlyHasNullableMembers ` / ` OnlyHasNonNullableMembers ` ), type-level dependencies ( ` DependsOn ` / ` DoesNotDependOn ` / ` DependsOnlyOn ` / ` HasDependenciesOutside ` , against namespaces or type selections ), operator presence by
9598 kind (` HasOperator(Operator) ` , ` HasOperator<TOperand>(Operator) ` ) and conversion operators by signature (` HasImplicitConversionOperator<TSource, TTarget> ` , ` HasExplicitConversionOperator<TSource, TTarget> ` ).
9699
97100<Tabs groupId = " assertion-library" >
@@ -169,7 +172,7 @@ await Expect.That(In.AssemblyContaining<MyClass>()
169172## Property
170173
171174- ** FluentAssertions** (` PropertyInfoAssertions ` ): ` BeVirtual ` /` NotBeVirtual ` , ` BeReadable ` /` BeWritable ` (each with an optional ` CSharpAccessModifier ` ), ` NotBeReadable ` /` NotBeWritable ` , ` Return<T> ` /` NotReturn<T> ` , ` BeDecoratedWith<T> ` . No assertions for ` static ` /` abstract ` /` sealed ` /` required ` /indexer/init-setter/override, and no name assertion.
172- - ** aweXpect.Reflection** : ` IsReadable ` /` IsWritable ` /` IsReadOnly ` /` IsWriteOnly ` /` IsReadWrite ` , ` HasAGetter ` /` HasASetter ` /` HasAnInitSetter ` , ` IsStatic ` /` IsAbstract ` /` IsSealed ` /` IsVirtual ` , ` IsRequired ` , ` IsAnIndexer ` , ` Overrides<T> ` , ` IsOfType<T> ` /` IsOfExactType<T> ` , ` HasName ` , ` Has<TAttribute> ` .
175+ - ** aweXpect.Reflection** : ` IsReadable ` /` IsWritable ` /` IsReadOnly ` /` IsWriteOnly ` /` IsReadWrite ` , ` HasAGetter ` /` HasASetter ` /` HasAnInitSetter ` , ` IsStatic ` /` IsAbstract ` /` IsSealed ` /` IsVirtual ` , ` IsRequired ` , ` IsNullable ` , ` IsAnIndexer ` , ` IsAnExtensionProperty ` , ` Overrides<T> ` , ` IsOfType<T> ` /` IsOfExactType<T> ` , ` HasName ` , ` Has<TAttribute> ` .
173176
174177<Tabs groupId = " assertion-library" >
175178<TabItem value = " fluentassertions" label = " FluentAssertions" default >
@@ -228,7 +231,7 @@ await Expect.That(typeof(MyClass)).HasADefaultConstructor();
228231## Field
229232
230233- ** FluentAssertions** : no ` FieldInfo ` assertions.
231- - ** aweXpect.Reflection** : singular (` ThatField ` ) and plural (` ThatFields ` ) assertions and an ` In.*…Fields() ` filter: ` IsStatic ` , ` IsReadOnly ` , ` IsConstant ` , ` IsOfType<T> ` /` IsOfExactType<T> ` , access modifiers (` IsPublic ` , …), ` HasName ` , ` Has<TAttribute> ` .
234+ - ** aweXpect.Reflection** : singular (` ThatField ` ) and plural (` ThatFields ` ) assertions and an ` In.*…Fields() ` filter: ` IsStatic ` , ` IsReadOnly ` , ` IsConstant ` , ` IsRequired ` , ` IsNullable ` , ` IsOfType<T> ` /` IsOfExactType<T> ` , access modifiers (` IsPublic ` , …), ` HasName ` , ` Has<TAttribute> ` .
232235
233236<Tabs groupId = " assertion-library" >
234237<TabItem value = " fluentassertions" label = " FluentAssertions" default >
0 commit comments