OSDN Git Service

部分文字列に対するアサーションをAssert.StartsWithで行う (xUnit2009)
authorKimura Youichi <kim.upsilon@bucyou.net>
Fri, 4 May 2018 19:53:43 +0000 (04:53 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 5 May 2018 01:53:44 +0000 (10:53 +0900)
OpenTween.Tests/Connection/OAuthUtilityTest.cs

index 94b2b0d..d26908d 100644 (file)
@@ -112,7 +112,7 @@ namespace OpenTween.Connection
                 "GET", new Uri("http://example.com/hoge"), new Dictionary<string, string> { ["aaa"] = "hoge" },
                 "ConsumerKey", "ConsumerSecret", "AccessToken", "AccessSecret", "Realm");
 
-            Assert.True(authorization.StartsWith("OAuth ", StringComparison.Ordinal));
+            Assert.StartsWith("OAuth ", authorization, StringComparison.Ordinal);
 
             var parsedParams = authorization.Substring(6).Split(',')
                 .Where(x => !string.IsNullOrEmpty(x))