From 441d893a495c1d894f715e5f915a5e95b4e28a12 Mon Sep 17 00:00:00 2001 From: verhoek Date: Sat, 9 Jun 2018 14:19:18 +0200 Subject: [PATCH] Changes to make codacy happier. --- Duplicati/Library/Backend/GoogleServices/WebApi.cs | 4 ++-- Duplicati/Library/Utility/UrlPath.cs | 8 +------- Duplicati/UnitTest/WebApiTests.cs | 6 +++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Duplicati/Library/Backend/GoogleServices/WebApi.cs b/Duplicati/Library/Backend/GoogleServices/WebApi.cs index 815f599cb..914f7cc37 100644 --- a/Duplicati/Library/Backend/GoogleServices/WebApi.cs +++ b/Duplicati/Library/Backend/GoogleServices/WebApi.cs @@ -22,7 +22,7 @@ namespace Duplicati.Library.Backend.WebApi { public class Google { - public class QueryParam + protected class QueryParam { public const string File = "q"; public const string PageToken = "pageToken"; @@ -30,7 +30,7 @@ namespace Duplicati.Library.Backend.WebApi public const string Alt = "alt"; } - public class QueryValue + protected class QueryValue { public const string True = "true"; public const string Resumable = "resumable"; diff --git a/Duplicati/Library/Utility/UrlPath.cs b/Duplicati/Library/Utility/UrlPath.cs index 717ed2e1b..449cfece5 100644 --- a/Duplicati/Library/Utility/UrlPath.cs +++ b/Duplicati/Library/Utility/UrlPath.cs @@ -21,13 +21,7 @@ namespace Duplicati.Library.Utility { public class UrlPath { - /// - /// Concats paths of URIs. - /// - /// The concatenated paths. - /// Path1. - - StringBuilder paths; + readonly StringBuilder paths; bool trailingSlash = false; public UrlPath(string path) diff --git a/Duplicati/UnitTest/WebApiTests.cs b/Duplicati/UnitTest/WebApiTests.cs index c1b0017e9..0c8784827 100644 --- a/Duplicati/UnitTest/WebApiTests.cs +++ b/Duplicati/UnitTest/WebApiTests.cs @@ -24,7 +24,7 @@ namespace Duplicati.UnitTest { [Test] [Category("WebApi")] - public void GoogleCloudPutUrl() + public static void GoogleCloudPutUrl() { string bucketId = "my_bucket"; @@ -35,7 +35,7 @@ namespace Duplicati.UnitTest [Test] [Category("WebApi")] - public void CreateFolderUrl() + public static void CreateFolderUrl() { var url = "https://www.googleapis.com/drive/v2/files?supportsTeamDrives=true"; Assert.AreEqual(url, GoogleDrive.CreateFolderUrl(true)); @@ -43,7 +43,7 @@ namespace Duplicati.UnitTest [Test] [Category("WebApi")] - public void AboutInfoUrl() + public static void AboutInfoUrl() { var url = "https://www.googleapis.com/drive/v2/about"; Assert.AreEqual(url, GoogleDrive.AboutInfoUrl());