Table of Contents

Class MacroAssert

Namespace
CMS.Tests
Assembly
CMS.Tests.dll

Custom macro assertions

public static class MacroAssert
Inheritance
object
MacroAssert

Methods

MacroReturnsExpectedValue(string, string, MacroResolver)

Resolves the macro condition using the selected resolver and compares the result with the expected value.

public static void MacroReturnsExpectedValue(string expectedValue, string macro, MacroResolver resolver)

Parameters

expectedValue string

Expected value

macro string

Macro condition to resolve

resolver MacroResolver

MacroResolver to use

Remarks

Fails if some error occurred during macro resolution

MacroReturnsExpectedValueWithResolveSettings(string, MacroResolver, ResolveExpressionSettings)

Resolves the data macro expression (expects expression without {% %} brackets) using the selected resolver and compares the result with the expected value.

public static void MacroReturnsExpectedValueWithResolveSettings(string expectedValue, MacroResolver resolver, ResolveExpressionSettings settings)

Parameters

expectedValue string

Expected value

resolver MacroResolver

MacroResolver to use

settings ResolveExpressionSettings

Settings of the resolving process

Remarks

Fails if some error occurred during macro resolution