OLD | NEW |
(Empty) | |
| 1 /* |
| 2 Copyright 2013 Google Inc |
| 3 |
| 4 Licensed under the Apache License, Version 2.0 (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 |
| 7 |
| 8 http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
| 10 Unless required by applicable law or agreed to in writing, software |
| 11 distributed under the License is distributed on an "AS IS" BASIS, |
| 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 See the License for the specific language governing permissions and |
| 14 limitations under the License. |
| 15 */ |
| 16 |
| 17 using System; |
| 18 using System.Collections.Generic; |
| 19 using System.Linq; |
| 20 using System.Text; |
| 21 |
| 22 using NUnit.Framework; |
| 23 |
| 24 namespace Google.Apis.Auth.OAuth2.Requests |
| 25 { |
| 26 /// <summary> |
| 27 /// Tests for <seealso cref="Google.Apis.Auth.OAuth2.Requests.GoogleAuthoriz
ationCodeRequestUrl"/>. |
| 28 /// </summary> |
| 29 [TestFixture] |
| 30 public class GoogleAuthorizationCodeRequestUrlTest |
| 31 { |
| 32 private readonly Uri AuthorizationCodeUrl = new Uri("http://www.authoriz
ation-server.com"); |
| 33 |
| 34 [Test] |
| 35 public void TestConstructor() |
| 36 { |
| 37 var request = new GoogleAuthorizationCodeRequestUrl(AuthorizationCod
eUrl); |
| 38 Assert.That(request.AuthorizationServerUrl, Is.EqualTo(Authorization
CodeUrl)); |
| 39 Assert.Null(request.ClientId); |
| 40 Assert.Null(request.RedirectUri); |
| 41 Assert.That(request.ResponseType, Is.EqualTo("code")); |
| 42 Assert.Null(request.Scope); |
| 43 Assert.Null(request.State); |
| 44 Assert.That(request.AccessType, Is.EqualTo("offline")); |
| 45 Assert.Null(request.ApprovalPrompt); |
| 46 Assert.Null(request.LoginHint); |
| 47 } |
| 48 } |
| 49 } |
OLD | NEW |