Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 Copyright 2013 Google Inc | 2 Copyright 2013 Google Inc |
3 | 3 |
4 Licensed under the Apache License, Version 2.0 (the "License"); | 4 Licensed under the Apache License, Version 2.0 (the "License"); |
5 you may not use this file except in compliance with the License. | 5 you may not use this file except in compliance with the License. |
6 You may obtain a copy of the License at | 6 You may obtain a copy of the License at |
7 | 7 |
8 http://www.apache.org/licenses/LICENSE-2.0 | 8 http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 |
10 Unless required by applicable law or agreed to in writing, software | 10 Unless required by applicable law or agreed to in writing, software |
11 distributed under the License is distributed on an "AS IS" BASIS, | 11 distributed under the License is distributed on an "AS IS" BASIS, |
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 See the License for the specific language governing permissions and | 13 See the License for the specific language governing permissions and |
14 limitations under the License. | 14 limitations under the License. |
15 */ | 15 */ |
16 | 16 |
17 using System; | 17 using System; |
18 | 18 |
19 using NUnit.Framework; | 19 using NUnit.Framework; |
20 | 20 |
21 namespace Google.Apis.Auth.OAuth2.Requests | 21 namespace Google.Apis.Auth.OAuth2.Requests |
22 { | 22 { |
23 /// <summary> | 23 /// <summary> |
24 /// Tests for <seealso cref="Google.Apis.Google.Apis.Auth.OAuth2.Requests.Au thorizationCodeRequestUrl"/>. | 24 /// Tests for <seealso cref="Google.Apis.Auth.OAuth2.Requests.AuthorizationC odeRequestUrl"/>. |
class
2013/10/02 17:37:18
Is this testing building URLs for authorization co
peleyal
2013/10/02 18:24:45
Done.
| |
25 /// It tests that the constructor sets the default values and the building U RI method. | |
25 /// </summary> | 26 /// </summary> |
26 [TestFixture] | 27 [TestFixture] |
27 public class AuthorizationCodeRequestUrlTests | 28 public class AuthorizationCodeRequestUrlTests |
28 { | 29 { |
29 private readonly Uri AuthorizationCodeUrl = new Uri("http://www.authoriz ation-server.com"); | 30 private readonly Uri AuthorizationCodeUrl = new Uri("http://www.authoriz ation-server.com"); |
30 | 31 |
31 [Test] | 32 [Test] |
32 public void TestConstructor() | 33 public void TestConstructor() |
33 { | 34 { |
34 var request = new AuthorizationCodeRequestUrl(AuthorizationCodeUrl); | 35 var request = new AuthorizationCodeRequestUrl(AuthorizationCodeUrl); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 RedirectUri = "???", | 73 RedirectUri = "???", |
73 Scope = "SC@PE", | 74 Scope = "SC@PE", |
74 State = "!", | 75 State = "!", |
75 }; | 76 }; |
76 var uri = request.Build(); | 77 var uri = request.Build(); |
77 Assert.That(uri, Is.EqualTo(new Uri(AuthorizationCodeUrl.ToString() | 78 Assert.That(uri, Is.EqualTo(new Uri(AuthorizationCodeUrl.ToString() |
78 "?response_type=code&client_id=pa$$word&redirect_uri=??% 3F&scope=SC@PE&state=!"))); | 79 "?response_type=code&client_id=pa$$word&redirect_uri=??% 3F&scope=SC@PE&state=!"))); |
79 } | 80 } |
80 } | 81 } |
81 } | 82 } |
LEFT | RIGHT |