public void GetAuthenticationLength_DifferentValidScenarios_AllReturnNonZero()
{
CallGetAuthenticationLength(" Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== ", 1, 37,
new AuthenticationHeaderValue("Basic", "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="));
CallGetAuthenticationLength(" Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== , ", 1, 37,
new AuthenticationHeaderValue("Basic", "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="));
CallGetAuthenticationLength(" Basic realm=\"example.com\"", 1, 25,
new AuthenticationHeaderValue("Basic", "realm=\"example.com\""));
CallGetAuthenticationLength(" Basic realm=\"exam,,ple.com\",", 1, 27,
new AuthenticationHeaderValue("Basic", "realm=\"exam,,ple.com\""));
CallGetAuthenticationLength(" Basic realm=\"exam,ple.com\",", 1, 26,
new AuthenticationHeaderValue("Basic", "realm=\"exam,ple.com\""));
CallGetAuthenticationLength("NTLM ", 0, 7, new AuthenticationHeaderValue("NTLM"));
CallGetAuthenticationLength("Digest", 0, 6, new AuthenticationHeaderValue("Digest"));
CallGetAuthenticationLength("Digest,,", 0, 6, new AuthenticationHeaderValue("Digest"));
CallGetAuthenticationLength("Digest a=b, c=d,,", 0, 15, new AuthenticationHeaderValue("Digest", "a=b, c=d"));
CallGetAuthenticationLength("Kerberos,", 0, 8, new AuthenticationHeaderValue("Kerberos"));
CallGetAuthenticationLength("Basic,NTLM", 0, 5, new AuthenticationHeaderValue("Basic"));
CallGetAuthenticationLength("Digest a=b,c=\"d\", e=f, NTLM", 0, 21,
new AuthenticationHeaderValue("Digest", "a=b,c=\"d\", e=f"));
CallGetAuthenticationLength("Digest a = b , c = \"d\" , e = f ,NTLM", 0, 32,
new AuthenticationHeaderValue("Digest", "a = b , c = \"d\" , e = f"));
CallGetAuthenticationLength("Digest a = b , c = \"d\" , e = f , NTLM AbCdEf==", 0, 32,
new AuthenticationHeaderValue("Digest", "a = b , c = \"d\" , e = f"));
CallGetAuthenticationLength("Digest a = \"b\", c= \"d\" , e = f,NTLM AbC=,", 0, 31,
new AuthenticationHeaderValue("Digest", "a = \"b\", c= \"d\" , e = f"));
CallGetAuthenticationLength("Digest a=\"b\", c=d", 0, 17,
new AuthenticationHeaderValue("Digest", "a=\"b\", c=d"));
CallGetAuthenticationLength("Digest a=\"b\", c=d,", 0, 17,
new AuthenticationHeaderValue("Digest", "a=\"b\", c=d"));
CallGetAuthenticationLength("Digest a=\"b\", c=d ,", 0, 18,
new AuthenticationHeaderValue("Digest", "a=\"b\", c=d"));
CallGetAuthenticationLength("Digest a=\"b\", c=d ", 0, 19,
new AuthenticationHeaderValue("Digest", "a=\"b\", c=d"));
CallGetAuthenticationLength("Custom \"blob\", c=d,Custom2 \"blob\"", 0, 18,
new AuthenticationHeaderValue("Custom", "\"blob\", c=d"));
CallGetAuthenticationLength("Custom \"blob\", a=b,,,c=d,Custom2 \"blob\"", 0, 24,
new AuthenticationHeaderValue("Custom", "\"blob\", a=b,,,c=d"));
CallGetAuthenticationLength("Custom \"blob\", a=b,c=d,,,Custom2 \"blob\"", 0, 22,
new AuthenticationHeaderValue("Custom", "\"blob\", a=b,c=d"));
CallGetAuthenticationLength("Custom a=b, c=d,,,InvalidNextScheme\u670D", 0, 15,
new AuthenticationHeaderValue("Custom", "a=b, c=d"));
}