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

Side by Side Diff: Src/GoogleApis.Tests/ApplicationContextTests.cs

Issue 12020043: Issue 325 - Remove discovery and codegen (Closed) Base URL: https://google-api-dotnet-client.googlecode.com/hg/
Patch Set: Sir miceli comment Created 10 years, 7 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:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright 2011 Google Inc 2 Copyright 2011 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 public void RegisterLoggerTest() 85 public void RegisterLoggerTest()
86 { 86 {
87 // Initialize with a NullLogger: 87 // Initialize with a NullLogger:
88 Assert.IsInstanceOf<NullLogger>(ApplicationContext.Logger); 88 Assert.IsInstanceOf<NullLogger>(ApplicationContext.Logger);
89 89
90 // Register a new logger: 90 // Register a new logger:
91 Assert.DoesNotThrow(() => ApplicationContext.RegisterLogger(new Mock Logger())); 91 Assert.DoesNotThrow(() => ApplicationContext.RegisterLogger(new Mock Logger()));
92 92
93 // Fail test: 93 // Fail test:
94 Assert.Throws<InvalidOperationException>(() => ApplicationContext.Re gisterLogger(new MockLogger())); 94 Assert.Throws<InvalidOperationException>(() => ApplicationContext.Re gisterLogger(new MockLogger()));
95
96 // change back to default logger
97 ApplicationContext.logger = null;
95 } 98 }
96 } 99 }
97 } 100 }
OLDNEW
« no previous file with comments | « Src/GoogleApis.Tests/Apis/Utils/UtilitiesTest.cs ('k') | Src/GoogleApis.Tests/DiscoveryTests.cs » ('j') | no next file with comments »

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