OLD | NEW |
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 |
(...skipping 14 matching lines...) Expand all Loading... |
25 namespace Google.Apis.Tests.Apis.Requests | 25 namespace Google.Apis.Tests.Apis.Requests |
26 { | 26 { |
27 /// <summary> Tests <see cref="Google.Api.Requests.ParameterValidator"/>. </
summary> | 27 /// <summary> Tests <see cref="Google.Api.Requests.ParameterValidator"/>. </
summary> |
28 [TestFixture] | 28 [TestFixture] |
29 public class ParameterValidatorTest | 29 public class ParameterValidatorTest |
30 { | 30 { |
31 /// <summary> Tests that validate regex returns <c>false</c> on empty pa
rameter sets. </summary> | 31 /// <summary> Tests that validate regex returns <c>false</c> on empty pa
rameter sets. </summary> |
32 [Test] | 32 [Test] |
33 public void ValidateRegexEmptyNeedsDataTest() | 33 public void ValidateRegexEmptyNeedsDataTest() |
34 { | 34 { |
35 var parameter = new MockParameter() { Pattern = ". ", Name = "test"
}; | 35 var parameter = new Parameter() { Pattern = ". ", Name = "test" }; |
36 Assert.IsFalse(ParameterValidator.ValidateRegex(parameter, "")); | 36 Assert.IsFalse(ParameterValidator.ValidateRegex(parameter, "")); |
37 } | 37 } |
38 | 38 |
39 /// <summary> Tests validate regex. </summary> | 39 /// <summary> Tests validate regex. </summary> |
40 [Test] | 40 [Test] |
41 public void ValidateRegexTest() | 41 public void ValidateRegexTest() |
42 { | 42 { |
43 var parameter = new MockParameter() { Pattern = ". ", Name = "test"
}; | 43 var parameter = new Parameter() { Pattern = ". ", Name = "test" }; |
44 Assert.IsTrue(ParameterValidator.ValidateRegex(parameter, "Test")); | 44 Assert.IsTrue(ParameterValidator.ValidateRegex(parameter, "Test")); |
45 } | 45 } |
46 } | 46 } |
47 } | 47 } |
OLD | NEW |