Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(111)

Delta Between Two Patch Sets: Src/GoogleApis.Auth.Tests/OAuth2/Requests/GoogleAuthorizationCodeRequestUrlTest.cs

Issue 13972043: Issue 351: Reimplement OAuth2 (Step 3 - Tests, Flows and Credential) (Closed) Base URL: https://google-api-dotnet-client.googlecode.com/hg/
Left Patch Set: 2nd round Created 10 years, 6 months ago
Right Patch Set: minor Created 10 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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 using System.Collections.Generic; 18 using System.Collections.Generic;
19 using System.Linq; 19 using System.Linq;
20 using System.Text; 20 using System.Text;
21 21
22 using NUnit.Framework; 22 using NUnit.Framework;
23 23
24 namespace Google.Apis.Auth.OAuth2.Requests 24 namespace Google.Apis.Auth.OAuth2.Requests
25 { 25 {
26 /// <summary> 26 /// <summary>
27 /// Tests for <seealso cref="Google.Apis.Google.Apis.Auth.OAuth2.Requests.Go ogleAuthorizationCodeRequestUrl"/>. 27 /// Tests for <seealso cref="Google.Apis.Auth.OAuth2.Requests.GoogleAuthoriz ationCodeRequestUrl"/>.
28 /// </summary> 28 /// </summary>
29 [TestFixture] 29 [TestFixture]
30 public class GoogleAuthorizationCodeRequestUrlTest 30 public class GoogleAuthorizationCodeRequestUrlTest
31 { 31 {
32 private readonly Uri AuthorizationCodeUrl = new Uri("http://www.authoriz ation-server.com"); 32 private readonly Uri AuthorizationCodeUrl = new Uri("http://www.authoriz ation-server.com");
33 33
34 [Test] 34 [Test]
35 public void TestConstructor() 35 public void TestConstructor()
36 { 36 {
37 var request = new GoogleAuthorizationCodeRequestUrl(AuthorizationCod eUrl); 37 var request = new GoogleAuthorizationCodeRequestUrl(AuthorizationCod eUrl);
38 Assert.That(request.AuthorizationServerUrl, Is.EqualTo(Authorization CodeUrl)); 38 Assert.That(request.AuthorizationServerUrl, Is.EqualTo(Authorization CodeUrl));
39 Assert.Null(request.ClientId); 39 Assert.Null(request.ClientId);
40 Assert.Null(request.RedirectUri); 40 Assert.Null(request.RedirectUri);
41 Assert.That(request.ResponseType, Is.EqualTo("code")); 41 Assert.That(request.ResponseType, Is.EqualTo("code"));
42 Assert.Null(request.Scope); 42 Assert.Null(request.Scope);
43 Assert.Null(request.State); 43 Assert.Null(request.State);
44 Assert.That(request.AccessType, Is.EqualTo("offline")); 44 Assert.That(request.AccessType, Is.EqualTo("offline"));
45 Assert.Null(request.ApprovalPrompt); 45 Assert.Null(request.ApprovalPrompt);
46 Assert.Null(request.LoginHint); 46 Assert.Null(request.LoginHint);
47 } 47 }
48 } 48 }
49 } 49 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b