sdk/dotnet/test/Datasync.Common.Test/AssertEx.cs
/// <summary>
/// Asserts if the header dictionary contains the provided value.
/// </summary>
/// <param name="key">the header name</param>
/// <param name="expected">the header value</param>
/// <param name="headers">The headers</param>
Asserts if the header dictionary contains the provided value.
Asserts if the header dictionary contains the provided value .
public static void Contains(string key, string expected, IDictionary<string, IEnumerable<string>> headers)
        {
            Assert.True(headers.TryGetValue(key, out IEnumerable<string> values), $"Dictionary does not contain key {key}");
            Assert.True(values.Count() == 1, $"Dictionary contains multiple values for {key}");
            Assert.Equal(expected, values.Single());
        }
public static void Contains ( string key , string expected , IDictionary < string , IEnumerable < string > > headers ) { Assert . True ( headers . TryGetValue ( key , out IEnumerable < string > values ) , $" Dictionary does not contain key  { key } " ) ; Assert . True ( values . Count ( ) == 1 , $" Dictionary contains multiple values for  { key } " ) ; Assert . Equal ( expected , values . Single ( ) ) ; }
Asserts if the header dictionary contains the provided value.
Asserts if the header dictionary contains the provided value .
key
string
the header name
the header name
expected
string
the header value
the header value
headers
IDictionary<string, IEnumerable<string>>
None