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

Delta Between Two Patch Sets: Src/GoogleApis.Tests/Apis/Requests/Parameters/ParameterValidatorTest.cs

Issue 13412046: Reimplement OAuth2 library - Step 1 (Closed) Base URL: https://google-api-dotnet-client.googlecode.com/hg/
Left Patch Set: Created 10 years, 10 months ago
Right Patch Set: minor Created 10 years, 10 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 2010 Google Inc 2 Copyright 2010 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.Collections.Generic;
18 17
19 using NUnit.Framework; 18 using NUnit.Framework;
20 19
21 using Google.Apis.Discovery; 20 using Google.Apis.Discovery;
22 using Google.Apis.Requests;
23 using Google.Apis.Testing;
24 using Google.Apis.Requests.Parameters; 21 using Google.Apis.Requests.Parameters;
25 22
26 namespace Google.Apis.Tests.Apis.Requests 23 namespace Google.Apis.Tests.Apis.Requests
27 { 24 {
28 /// <summary> Tests <see cref="Google.Api.Requests.ParameterValidator"/>. </ summary> 25 /// <summary>Tests <see cref="Google.Api.Requests.ParameterValidator"/>.</su mmary>
29 [TestFixture] 26 [TestFixture]
30 public class ParameterValidatorTest 27 public class ParameterValidatorTest
31 { 28 {
32 /// <summary> Tests that validate regex returns <c>false</c> on empty pa rameter sets. </summary> 29 /// <summary>Tests that validate regex returns <c>false</c> on empty par ameter sets.</summary>
33 [Test] 30 [Test]
34 public void ValidateRegexEmptyNeedsDataTest() 31 public void ValidateRegexEmptyNeedsDataTest()
35 { 32 {
36 var parameter = new Parameter { Pattern = ". ", Name = "test" }; 33 var parameter = new Parameter { Pattern = ". ", Name = "test" };
37 Assert.IsFalse(ParameterValidator.ValidateRegex(parameter, "")); 34 Assert.IsFalse(ParameterValidator.ValidateRegex(parameter, ""));
38 } 35 }
39 36
40 /// <summary> Tests validate regex. </summary> 37 /// <summary>Tests validate regex.</summary>
41 [Test] 38 [Test]
42 public void ValidateRegexTest() 39 public void ValidateRegexTest()
43 { 40 {
44 var parameter = new Parameter { Pattern = ". ", Name = "test" }; 41 var parameter = new Parameter { Pattern = ". ", Name = "test" };
45 Assert.IsTrue(ParameterValidator.ValidateRegex(parameter, "Test")); 42 Assert.IsTrue(ParameterValidator.ValidateRegex(parameter, "Test"));
46 } 43 }
47 } 44 }
48 } 45 }
LEFTRIGHT

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