public void Library_NoComponentSpecificNamespaces() =>
 // Note: If this test fails, the other one in this file will fail as well
 // but let's have the double protection.
 CodeHealthTester.AssertNoDisallowedNamespaces(
     typeof(IConsumer <>),
     "Google.Cloud.Diagnostics.Common.ErrorReporting",
     "Google.Cloud.Diagnostics.Common.Logging",
     "Google.Cloud.Diagnostics.Common.Trace");
Exemplo n.º 2
0
 public void Library_NoComponentSpecificNamespaces() =>
 // Note: If this test fails, the other one in this file will fail as well
 // but let's have the double protection.
 CodeHealthTester.AssertNoDisallowedNamespaces(
     typeof(AspNetCoreErrorReportingExtensions),
     BaseNamespace + ".ErrorReporting",
     BaseNamespace + ".Logging",
     BaseNamespace + ".Trace");
Exemplo n.º 3
0
 public void Library_NoComponentSpecificNamespaces() =>
 // Note: If this test fails, the other one in this file will fail as well
 // but let's have the double protection.
 CodeHealthTester.AssertNoDisallowedNamespaces(
     typeof(GoogleDiagnosticsStartupFilter),
     BaseNamespace + ".ErrorReporting",
     BaseNamespace + ".Logging",
     BaseNamespace + ".Trace");
Exemplo n.º 4
0
 public void SealedClasses()
 {
     CodeHealthTester.AssertClassesAreSealedOrAbstract(typeof(TranslationClient));
 }
Exemplo n.º 5
0
 public void PrivateFields()
 {
     CodeHealthTester.AssertAllFieldsPrivate(typeof(TranslationClient));
 }
Exemplo n.º 6
0
 public void SealedClasses()
 {
     CodeHealthTester.AssertClassesAreSealedOrAbstract(typeof(StorageClient));
 }
Exemplo n.º 7
0
 public void PrivateFields()
 {
     CodeHealthTester.AssertAllFieldsPrivate(typeof(StorageClient));
 }
Exemplo n.º 8
0
 public void Library_OnlyAspNetCoreNamespace() =>
 CodeHealthTester.AssertOnlyAllowedNamespaces(
     typeof(AspNetCoreErrorReportingExtensions), BaseNamespace);
Exemplo n.º 9
0
 public void SealedClasses()
 {
     // Query is neither sealed nor abstract, deliberately: CollectionReference derives from it, and
     // it creates new instances of itself.
     CodeHealthTester.AssertClassesAreSealedOrAbstract(typeof(FirestoreDb), new[] { typeof(Query) });
 }
Exemplo n.º 10
0
 public void PrivateFields()
 {
     CodeHealthTester.AssertAllFieldsPrivate(typeof(FirestoreDb));
 }
Exemplo n.º 11
0
 public void PrivateFields()
 {
     CodeHealthTester.AssertAllFieldsPrivate(typeof(BigqueryClient));
 }
Exemplo n.º 12
0
 public void Library_OnlyCommonNamespace() =>
 CodeHealthTester.AssertOnlyAllowedNamespaces(
     typeof(IConsumer <>), "Google.Cloud.Diagnostics.Common");
Exemplo n.º 13
0
 public void Library_OnlyAspNetCoreNamespace() =>
 CodeHealthTester.AssertOnlyAllowedNamespaces(
     typeof(GoogleDiagnosticsStartupFilter), BaseNamespace);