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");
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");
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");
public void SealedClasses() { CodeHealthTester.AssertClassesAreSealedOrAbstract(typeof(TranslationClient)); }
public void PrivateFields() { CodeHealthTester.AssertAllFieldsPrivate(typeof(TranslationClient)); }
public void SealedClasses() { CodeHealthTester.AssertClassesAreSealedOrAbstract(typeof(StorageClient)); }
public void PrivateFields() { CodeHealthTester.AssertAllFieldsPrivate(typeof(StorageClient)); }
public void Library_OnlyAspNetCoreNamespace() => CodeHealthTester.AssertOnlyAllowedNamespaces( typeof(AspNetCoreErrorReportingExtensions), BaseNamespace);
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) }); }
public void PrivateFields() { CodeHealthTester.AssertAllFieldsPrivate(typeof(FirestoreDb)); }
public void PrivateFields() { CodeHealthTester.AssertAllFieldsPrivate(typeof(BigqueryClient)); }
public void Library_OnlyCommonNamespace() => CodeHealthTester.AssertOnlyAllowedNamespaces( typeof(IConsumer <>), "Google.Cloud.Diagnostics.Common");
public void Library_OnlyAspNetCoreNamespace() => CodeHealthTester.AssertOnlyAllowedNamespaces( typeof(GoogleDiagnosticsStartupFilter), BaseNamespace);