LogValuesAssert Class

Namespace
Microsoft.Extensions.Logging.Testing
Assemblies
  • Microsoft.Extensions.Logging.Testing

Syntax

public class LogValuesAssert
class Microsoft.Extensions.Logging.Testing.LogValuesAssert

Methods

Contains(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>>)

Asserts that all the expected values are present in the actual values by ignoring the order of values.

Arguments:
  • expectedValues (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String>>) – Expected subset of values
  • actualValues (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String>>) – Actual set of values
public static void Contains(IEnumerable<KeyValuePair<string, object>> expectedValues, IEnumerable<KeyValuePair<string, object>> actualValues)
Contains(System.String, System.Object, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>>)

Asserts that the given key and value are present in the actual values.

Arguments:
  • key (System.String) – The key of the item to be found.
  • value (System.Object) – The value of the item to be found.
  • actualValues (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String>>) – The actual values.
public static void Contains(string key, object value, IEnumerable<KeyValuePair<string, object>> actualValues)