Class TypeFluentAssertions
- Namespace
- OneImlx.Test.FluentAssertions
- Assembly
- OneImlx.Test.dll
The fluent assertion extension methods for Type.
public static class TypeFluentAssertions
- Inheritance
-
TypeFluentAssertions
- Inherited Members
Methods
HaveConstantCount(TypeAssertions, int)
Asserts that the specified type has the defined number of constants.
public static AndConstraint<TypeAssertions> HaveConstantCount(this TypeAssertions assertions, int expectedCount)
Parameters
assertions
TypeAssertionsFluent Assertions wrapper for the type.
expectedCount
intThe expected number of constants.
Returns
- AndConstraint<TypeAssertions>
An AndConstraint object for method chaining.
HaveJsonProperty(TypeAssertions, string, string)
Asserts that a specified property of a type is decorated with the JsonPropertyNameAttribute having a specific name.
public static AndConstraint<TypeAssertions> HaveJsonProperty(this TypeAssertions typeAssertions, string propertyName, string jsonPropertyName)
Parameters
typeAssertions
TypeAssertionsThe TypeAssertions instance on which this method extends.
propertyName
stringThe name of the property to check.
jsonPropertyName
stringThe expected name value of the JsonPropertyNameAttribute.
Returns
- AndConstraint<TypeAssertions>
An AndConstraint for continuing the assertion chain.
HavePropertyCount(TypeAssertions, int)
Asserts that the specified type has the defined number of properties.
public static AndConstraint<TypeAssertions> HavePropertyCount(this TypeAssertions assertions, int expectedCount)
Parameters
assertions
TypeAssertionsFluent Assertions wrapper for the type.
expectedCount
intThe expected number of properties.
Returns
- AndConstraint<TypeAssertions>
An AndConstraint object for method chaining.