1. Stylelabs.M.Sdk.Fluent.Testing.Extensions

Class FluentEntityExtensions

Extension methods for the FluentEntity type.

Inheritance

object

FluentEntityExtensions

Namespace: StylelabsStylelabs.MSdkFluentStylelabs.M.Sdk.Fluent.TestingExtensions

Assembly: Stylelabs.M.Sdk.Fluent.Testing.dll

Syntax

public static class FluentEntityExtensions

Methods

AssertPropertyEmpty(FluentEntity, string, CultureInfo)

Asserts that the property value is empty.

Declaration

public static FluentEntity AssertPropertyEmpty(this FluentEntity entity, string name, CultureInfo culture)

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
CultureInfocultureThe culture.

Returns

TypeDescription
FluentEntityA FluentEntity.

AssertPropertyEmpty(FluentEntity, string)

Asserts that the property value is empty.

Declaration

public static FluentEntity AssertPropertyEmpty(this FluentEntity entity, string name)

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.

Returns

TypeDescription
FluentEntityA FluentEntity.

AssertPropertyEqual(FluentEntity, string, T)

Asserts that the property value is equal to value.

Declaration

public static FluentEntity AssertPropertyEqual<T>(this FluentEntity entity, string name, T value)

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertPropertyEqual(FluentEntity, string, CultureInfo, T)

Asserts that the property value is equal to value.

Declaration

public static FluentEntity AssertPropertyEqual<T>(this FluentEntity entity, string name, CultureInfo culture, T value)

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
CultureInfocultureThe culture.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertPropertyGreater(FluentEntity, string, T)

Asserts that the property value is greater than value.

Declaration

public static FluentEntity AssertPropertyGreater<T>(this FluentEntity entity, string name, T value) where T : IComparable<T>

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertPropertyGreater(FluentEntity, string, CultureInfo, T)

Asserts that the property value is greater than value.

Declaration

public static FluentEntity AssertPropertyGreater<T>(this FluentEntity entity, string name, CultureInfo culture, T value) where T : IComparable<T>

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
CultureInfocultureThe culture.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertPropertyGreaterOrEqual(FluentEntity, string, T)

Asserts that the property value is greater than or equal to value.

Declaration

public static FluentEntity AssertPropertyGreaterOrEqual<T>(this FluentEntity entity, string name, T value) where T : IComparable<T>

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertPropertyGreaterOrEqual(FluentEntity, string, CultureInfo, T)

Asserts that the property value is greater than or equal to value.

Declaration

public static FluentEntity AssertPropertyGreaterOrEqual<T>(this FluentEntity entity, string name, CultureInfo culture, T value) where T : IComparable<T>

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
CultureInfocultureThe culture.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertPropertyLess(FluentEntity, string, T)

Asserts that the property value is less than value.

Declaration

public static FluentEntity AssertPropertyLess<T>(this FluentEntity entity, string name, T value) where T : IComparable<T>

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertPropertyLess(FluentEntity, string, CultureInfo, T)

Asserts that the property value is less than value.

Declaration

public static FluentEntity AssertPropertyLess<T>(this FluentEntity entity, string name, CultureInfo culture, T value) where T : IComparable<T>

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
CultureInfocultureThe culture.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertPropertyLessOrEqual(FluentEntity, string, T)

Asserts that the property value is less than or equal to value.

Declaration

public static FluentEntity AssertPropertyLessOrEqual<T>(this FluentEntity entity, string name, T value) where T : IComparable<T>

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertPropertyLessOrEqual(FluentEntity, string, CultureInfo, T)

Asserts that the property value is less than or equal to value.

Declaration

public static FluentEntity AssertPropertyLessOrEqual<T>(this FluentEntity entity, string name, CultureInfo culture, T value) where T : IComparable<T>

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
CultureInfocultureThe culture.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertPropertyNotEmpty(FluentEntity, string, CultureInfo)

Asserts that the property value is not empty.

Declaration

public static FluentEntity AssertPropertyNotEmpty(this FluentEntity entity, string name, CultureInfo culture)

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
CultureInfocultureThe culture.

Returns

TypeDescription
FluentEntityA FluentEntity.

AssertPropertyNotEmpty(FluentEntity, string)

Asserts that the property value is not empty.

Declaration

public static FluentEntity AssertPropertyNotEmpty(this FluentEntity entity, string name)

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.

Returns

TypeDescription
FluentEntityA FluentEntity.

AssertPropertyNotEqual(FluentEntity, string, T)

Asserts that the property value is not equal to value.

Declaration

public static FluentEntity AssertPropertyNotEqual<T>(this FluentEntity entity, string name, T value)

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe property type.

AssertPropertyNotEqual(FluentEntity, string, CultureInfo, T)

Asserts that the property value is not equal to value.

Declaration

public static FluentEntity AssertPropertyNotEqual<T>(this FluentEntity entity, string name, CultureInfo culture, T value)

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe property name.
CultureInfocultureThe culture.
TvalueThe value.

Returns

TypeDescription
FluentEntityA FluentEntity.

Type Parameters

NameDescription
TThe type of the property.

AssertRelation(FluentEntity, string, RelationRole?, FluentEntity)

Asserts that the specified relation exists.

Declaration

public static FluentEntity AssertRelation(this FluentEntity entity, string name, RelationRole? role = null, FluentEntity relatedEntity = null)

Parameters

TypeNameDescription
FluentEntityentityThe FluentEntity instance.
stringnameThe relation name.
RelationRoleroleThe relation role.
FluentEntityrelatedEntityThe related FluentEntity.

Returns

TypeDescription
FluentEntityA FluentEntity.
If you have suggestions for improving this article, let us know!