C# Class XunitShould.Should

Afficher le fichier Open project: EddieGarmon/XunitShould

Méthodes publiques

Méthode Description
ShouldBeFalse ( this condition ) : void

Verifies that the condition is false.

ShouldBeFalse ( this condition, Func messageGenerator ) : void

Verifies that the condition is false.

ShouldBeFalse ( this condition, string userMessage ) : void

Verifies that the condition is false.

ShouldBeNull ( this @object ) : void

Verifies that an object reference is null.

ShouldBeSameAs ( this actual, object expected ) : void

Verifies that two objects are the same instance.

ShouldBeTrue ( this condition ) : void

Verifies that an expression is true.

ShouldBeTrue ( this condition, Func messageGenerator ) : void

Verifies that an expression is true.

ShouldBeTrue ( this condition, string userMessage ) : void

Verifies that an expression is true.

ShouldChangeProperty ( this @object, string propertyName, System.Action testCode ) : void

Verifies that the provided object raised INotifyPropertyChanged.PropertyChanged as a result of executing the given test code.

ShouldContain ( this actual, string fragment, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
ShouldEndWith ( this actual, string ending, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
ShouldEqual ( this actual, string expected ) : void
ShouldEqual ( this actual, string expected, System.StringComparison comparisonType ) : void
ShouldEqual ( this actual, string expected, bool ignoreCase, bool ignoreLineEndingDifferences = false, bool ignoreWhiteSpaceDifferences = false ) : void
ShouldEqual ( this actual, string expected ) : void
ShouldMatch ( this actual, Regex pattern ) : void
ShouldMatch ( this actual, string regexPattern ) : void
ShouldNotBeNull ( this @object ) : void

Verifies that an object reference is not null.

ShouldNotBeSameAs ( this actual, object expected ) : void

Verifies that two objects are not the same instance.

ShouldNotContain ( this actual, string fragment, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
ShouldNotEndWith ( this actual, string ending, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
ShouldNotMatch ( this actual, Regex pattern ) : void
ShouldNotMatch ( this actual, string regexPattern ) : void
ShouldNotStartWith ( this actual, string begining, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
ShouldStartWith ( this actual, string begining, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void

Private Methods

Méthode Description
IsLineEnding ( char c ) : bool
IsWhiteSpace ( char c ) : bool
SkipLineEnding ( string value, int index ) : int
SkipWhitespace ( string value, int index ) : int

Method Details

ShouldBeFalse() public static méthode

Verifies that the condition is false.
Thrown if the condition is not false
public static ShouldBeFalse ( this condition ) : void
condition this The condition to be tested
Résultat void

ShouldBeFalse() public static méthode

Verifies that the condition is false.
Thrown if the condition is not false
public static ShouldBeFalse ( this condition, Func messageGenerator ) : void
condition this The condition to be tested
messageGenerator Func The message to show when the condition is not false
Résultat void

ShouldBeFalse() public static méthode

Verifies that the condition is false.
Thrown if the condition is not false
public static ShouldBeFalse ( this condition, string userMessage ) : void
condition this The condition to be tested
userMessage string The message to show when the condition is not false
Résultat void

ShouldBeNull() public static méthode

Verifies that an object reference is null.
Thrown when the object reference is not null
public static ShouldBeNull ( this @object ) : void
@object this
Résultat void

ShouldBeSameAs() public static méthode

Verifies that two objects are the same instance.
Thrown when the objects are not the same instance
public static ShouldBeSameAs ( this actual, object expected ) : void
actual this The actual object instance
expected object The expected object instance
Résultat void

ShouldBeTrue() public static méthode

Verifies that an expression is true.
Thrown when the condition is false
public static ShouldBeTrue ( this condition ) : void
condition this The condition to be inspected
Résultat void

ShouldBeTrue() public static méthode

Verifies that an expression is true.
Thrown when the condition is false
public static ShouldBeTrue ( this condition, Func messageGenerator ) : void
condition this The condition to be inspected
messageGenerator Func The message to be shown when the condition is false
Résultat void

ShouldBeTrue() public static méthode

Verifies that an expression is true.
Thrown when the condition is false
public static ShouldBeTrue ( this condition, string userMessage ) : void
condition this The condition to be inspected
userMessage string The message to be shown when the condition is false
Résultat void

ShouldChangeProperty() public static méthode

Verifies that the provided object raised INotifyPropertyChanged.PropertyChanged as a result of executing the given test code.
Thrown when the notification is not raised
public static ShouldChangeProperty ( this @object, string propertyName, System.Action testCode ) : void
@object this
propertyName string The property name for which the notification should be raised
testCode System.Action The test code which should cause the notification to be raised
Résultat void

ShouldContain() public static méthode

public static ShouldContain ( this actual, string fragment, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
actual this
fragment string
comparisonType System.StringComparison
Résultat void

ShouldEndWith() public static méthode

public static ShouldEndWith ( this actual, string ending, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
actual this
ending string
comparisonType System.StringComparison
Résultat void

ShouldEqual() public static méthode

public static ShouldEqual ( this actual, string expected ) : void
actual this
expected string
Résultat void

ShouldEqual() public static méthode

public static ShouldEqual ( this actual, string expected, System.StringComparison comparisonType ) : void
actual this
expected string
comparisonType System.StringComparison
Résultat void

ShouldEqual() public static méthode

public static ShouldEqual ( this actual, string expected, bool ignoreCase, bool ignoreLineEndingDifferences = false, bool ignoreWhiteSpaceDifferences = false ) : void
actual this
expected string
ignoreCase bool
ignoreLineEndingDifferences bool
ignoreWhiteSpaceDifferences bool
Résultat void

ShouldEqual() public static méthode

public static ShouldEqual ( this actual, string expected ) : void
actual this
expected string
Résultat void

ShouldMatch() public static méthode

public static ShouldMatch ( this actual, Regex pattern ) : void
actual this
pattern Regex
Résultat void

ShouldMatch() public static méthode

public static ShouldMatch ( this actual, string regexPattern ) : void
actual this
regexPattern string
Résultat void

ShouldNotBeNull() public static méthode

Verifies that an object reference is not null.
Thrown when the object is not null
public static ShouldNotBeNull ( this @object ) : void
@object this
Résultat void

ShouldNotBeSameAs() public static méthode

Verifies that two objects are not the same instance.
Thrown when the objects are the same instance
public static ShouldNotBeSameAs ( this actual, object expected ) : void
actual this The actual object instance
expected object The expected object instance
Résultat void

ShouldNotContain() public static méthode

public static ShouldNotContain ( this actual, string fragment, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
actual this
fragment string
comparisonType System.StringComparison
Résultat void

ShouldNotEndWith() public static méthode

public static ShouldNotEndWith ( this actual, string ending, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
actual this
ending string
comparisonType System.StringComparison
Résultat void

ShouldNotMatch() public static méthode

public static ShouldNotMatch ( this actual, Regex pattern ) : void
actual this
pattern Regex
Résultat void

ShouldNotMatch() public static méthode

public static ShouldNotMatch ( this actual, string regexPattern ) : void
actual this
regexPattern string
Résultat void

ShouldNotStartWith() public static méthode

public static ShouldNotStartWith ( this actual, string begining, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
actual this
begining string
comparisonType System.StringComparison
Résultat void

ShouldStartWith() public static méthode

public static ShouldStartWith ( this actual, string begining, System.StringComparison comparisonType = StringComparison.CurrentCulture ) : void
actual this
begining string
comparisonType System.StringComparison
Résultat void