Table of Contents

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 TypeAssertions

Fluent Assertions wrapper for the type.

expectedCount int

The 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 TypeAssertions

The TypeAssertions instance on which this method extends.

propertyName string

The name of the property to check.

jsonPropertyName string

The 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 TypeAssertions

Fluent Assertions wrapper for the type.

expectedCount int

The expected number of properties.

Returns

AndConstraint<TypeAssertions>

An AndConstraint object for method chaining.