diff --git a/.gitignore b/.gitignore index 63eb35f17..daa0b2208 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,6 @@ $RECYCLE.BIN/ .DS_Store *.nupkg /.vs + +# Jetbrains files +.idea* \ No newline at end of file diff --git a/Box.V2.Test.Integration/BoxAuthTestIntegration.cs b/Box.V2.Test.Integration/BoxAuthTestIntegration.cs index 8958cdc4d..be3ab4280 100644 --- a/Box.V2.Test.Integration/BoxAuthTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxAuthTestIntegration.cs @@ -1,14 +1,12 @@ -using System; +using System.Diagnostics.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Box.V2.Models; using System.Threading.Tasks; -using Box.V2.Auth; -using System.Diagnostics; using Box.V2.Config; using Box.V2.JWTAuth; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxAuthTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxCollaborationWhitelistManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxCollaborationWhitelistManagerTestIntegration.cs index 77ddcd8ca..22407f817 100644 --- a/Box.V2.Test.Integration/BoxCollaborationWhitelistManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxCollaborationWhitelistManagerTestIntegration.cs @@ -2,10 +2,12 @@ using Box.V2.Models; using System.Threading.Tasks; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using Box.V2.Config; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxCollaborationWhitelistManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -75,7 +77,7 @@ public async Task DomainWhitelist_LiveSession_ValidResponse() Assert.AreEqual(retrievedWhiteList.Id, whiteList.Id); Assert.AreEqual("collaboration_whitelist_entry", retrievedWhiteList.Type); - Assert.IsTrue(deletedWhiteList, "Collab whitelist was unable to be deleted"); + Assert.IsTrue(deletedWhiteList, "Collab whitelist was unable to be deleted"); } } } diff --git a/Box.V2.Test.Integration/BoxCollaborationsManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxCollaborationsManagerTestIntegration.cs index 0c142506a..bf718038a 100644 --- a/Box.V2.Test.Integration/BoxCollaborationsManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxCollaborationsManagerTestIntegration.cs @@ -2,9 +2,11 @@ using Box.V2.Models; using System.Threading.Tasks; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxCollaborationsManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -59,7 +61,7 @@ public async Task CollaborationsOnFolderWorkflow_LiveSession_ValidResponse() Assert.IsTrue(success, "Collaboration deletion was unsucessful"); } - // Test to add collaboration by Box User ID and Box Group ID. + // Test to add collaboration by Box User ID and Box Group ID. [TestMethod] public async Task AddGroupCollaboration_File_Fields_ValidResponse() { @@ -127,7 +129,7 @@ public async Task CollaborationsOnFileWorkflow_LiveSession_ValidResponse() Assert.AreEqual(fileId, collab.Item.Id, "File and collaboration file id do not match"); Assert.AreEqual(BoxCollaborationRoles.Viewer, collab.Role, "Incorrect collaboration role"); - + // TODO: Edit Collaboration BoxCollaborationRequest editRequest = new BoxCollaborationRequest() { @@ -146,7 +148,7 @@ public async Task CollaborationsOnFileWorkflow_LiveSession_ValidResponse() // test getting list of collaborations on file var collabs = await _client.FilesManager.GetCollaborationsAsync(fileId); - Assert.AreEqual(4, collabs.Entries.Count, "Failed to get correct number of file collabs."); + Assert.AreEqual(4, collabs.Entries.Count, "Failed to get correct number of file collabs."); // Test Remove Collaboration bool success = await _client.CollaborationsManager.RemoveCollaborationAsync(collab.Id); diff --git a/Box.V2.Test.Integration/BoxCollectionsManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxCollectionsManagerTestIntegration.cs index d6c694c87..b99724628 100644 --- a/Box.V2.Test.Integration/BoxCollectionsManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxCollectionsManagerTestIntegration.cs @@ -2,12 +2,14 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxCollectionsManagerTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxCommentsManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxCommentsManagerTestIntegration.cs index 1e3c53aaf..58e757ff6 100644 --- a/Box.V2.Test.Integration/BoxCommentsManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxCommentsManagerTestIntegration.cs @@ -1,10 +1,11 @@ -using System; +using System.Diagnostics.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Models; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxCommentsManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -24,7 +25,7 @@ public async Task CommentsWorkflow_LiveSession_ValidResponse() Type = BoxType.file } }; - + BoxComment c = await _client.CommentsManager.AddCommentAsync(addReq); Assert.AreEqual(fileId, c.Item.Id, "Comment was added to incorrect file"); @@ -57,7 +58,7 @@ public async Task CommentsWorkflow_LiveSession_ValidResponse() Assert.AreEqual(c.Id, cInfo.Id, "two comment objects have different ids"); Assert.AreEqual(BoxType.comment.ToString(), cInfo.Type, "returned object is not a comment"); - + // Update the comment const string updateMessage = "this is an updated test comment"; diff --git a/Box.V2.Test.Integration/BoxConfigTestIntegration.cs b/Box.V2.Test.Integration/BoxConfigTestIntegration.cs index df7877a3e..9b8dcbd24 100644 --- a/Box.V2.Test.Integration/BoxConfigTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxConfigTestIntegration.cs @@ -1,9 +1,11 @@ +using System.Diagnostics.CodeAnalysis; using Box.V2.Config; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxConfigTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxDevicePinManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxDevicePinManagerTestIntegration.cs index 6defcd540..171540413 100644 --- a/Box.V2.Test.Integration/BoxDevicePinManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxDevicePinManagerTestIntegration.cs @@ -1,12 +1,14 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxDevicePinManagerTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxEventsManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxEventsManagerTestIntegration.cs index 5c372e3b1..1c606269d 100644 --- a/Box.V2.Test.Integration/BoxEventsManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxEventsManagerTestIntegration.cs @@ -4,6 +4,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using System.Threading; @@ -11,6 +12,7 @@ namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxEventsManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -97,7 +99,7 @@ await _client.EventsManager.LongPollUserEvents(events.NextStreamPosition, Thread.Sleep(1000); - //make some events + //make some events var fileLock = await _client.FilesManager.LockAsync(new BoxFileLockRequest() { Lock = new BoxFileLock() { IsDownloadPrevented = false } }, fileId); var result = await _client.FilesManager.UnLock(fileId); @@ -107,7 +109,7 @@ await _client.EventsManager.LongPollUserEvents(events.NextStreamPosition, } catch (AggregateException e) { - //Console.WriteLine("\nAggregateException thrown with the following inner exceptions:"); + //Console.WriteLine("\nAggregateException thrown with the following inner exceptions:"); foreach (var v in e.InnerExceptions) { if (v is TaskCanceledException) @@ -120,7 +122,7 @@ await _client.EventsManager.LongPollUserEvents(events.NextStreamPosition, { //Console.WriteLine(" Exception: {0}", v.GetType().Name); Assert.Fail("Failed to get events using long polling."); - } + } } } finally diff --git a/Box.V2.Test.Integration/BoxFilesManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxFilesManagerTestIntegration.cs index d4acedc15..d2dff96d1 100644 --- a/Box.V2.Test.Integration/BoxFilesManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxFilesManagerTestIntegration.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Models; using Box.V2.Utility; @@ -12,7 +13,8 @@ using System.Reflection; namespace Box.V2.Test.Integration -{ +{ + [ExcludeFromCodeCoverage] [TestClass] public class BoxFilesManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -471,7 +473,7 @@ await _client.FilesManager.UploadUsingSessionAsync(fileInMemoryStream, remoteFil string fileId = await GetFileId(parentFolderId, remoteFileName); // Using previously uploaded Box file, upload a new file version for that Box file - var newBoxFile = await _client.FilesManager.UploadNewVersionUsingSessionAsync(fileInMemoryStream, fileId, newRemoteFileName, + var newBoxFile = await _client.FilesManager.UploadNewVersionUsingSessionAsync(fileInMemoryStream, fileId, newRemoteFileName, null, progress); Assert.IsNotNull(newBoxFile.FileVersion, "Did not successfully upload a new Box file version"); @@ -522,7 +524,7 @@ public async Task GetRepresentationContentAsync_E2E() byte[] assetBytes = memStream.ToArray(); Assert.IsTrue(assetBytes.Length > 4096, "Downlaoded asset contained " + assetBytes.Length + " but should contain more than 4 KB"); - } + } } #region Private functions diff --git a/Box.V2.Test.Integration/BoxFoldersManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxFoldersManagerTestIntegration.cs index 8f2be820d..1825e1ce7 100644 --- a/Box.V2.Test.Integration/BoxFoldersManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxFoldersManagerTestIntegration.cs @@ -5,9 +5,11 @@ using System.Collections.Generic; using System.Linq; using System; +using System.Diagnostics.CodeAnalysis; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxFoldersManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -55,9 +57,9 @@ private static async Task AssertFolderContents(BoxClient boxClient) const int numFiles = 9; const int numFolders = 2; - BoxCollection c = await boxClient.FoldersManager.GetFolderItemsAsync("0", 3, 0, new List() { - BoxItem.FieldName, - BoxItem.FieldSize, + BoxCollection c = await boxClient.FoldersManager.GetFolderItemsAsync("0", 3, 0, new List() { + BoxItem.FieldName, + BoxItem.FieldSize, BoxFolder.FieldItemCollection }, autoPaginate: true); diff --git a/Box.V2.Test.Integration/BoxGroupsManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxGroupsManagerTestIntegration.cs index 5a5fa2e39..7c826c161 100644 --- a/Box.V2.Test.Integration/BoxGroupsManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxGroupsManagerTestIntegration.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Models; @@ -7,6 +8,7 @@ namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxGroupsManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -17,7 +19,7 @@ public async Task GroupsWorkflow_ValidRequest_GetGroups() var allGroupsInit = await _client.GroupsManager.GetAllGroupsAsync(); var oneGroup = await _client.GroupsManager.GetGroupAsync(allGroupsInit.Entries[0].Id); Assert.AreEqual(allGroupsInit.Entries[0].Name, oneGroup.Name, "Did not retrieve the correct group"); - + // Create a new group string groupName = GetUniqueName(); @@ -55,7 +57,7 @@ public async Task GroupsWorkflow_ValidRequest_GetGroups() var delResult = await _client.GroupsManager.DeleteAsync(newGroup.Id); var allGroupsAfterDelete = await _client.GroupsManager.GetAllGroupsAsync(); - Assert.IsTrue(delResult, "Group was not deleted successfully"); + Assert.IsTrue(delResult, "Group was not deleted successfully"); Assert.AreEqual(allGroupsInit.TotalCount, allGroupsAfterDelete.TotalCount, "Number of groups after delete is not correct"); Assert.IsFalse(allGroupsAfterDelete.Entries.Any(x => x.Id == newGroup.Id), "Deleted group still exists"); } @@ -104,7 +106,7 @@ public async Task GroupMembershipWorkflow_ValidRequest() request = new BoxGroupMembershipRequest() { Role = "admin" }; var updatedMembership = await _client.GroupsManager.UpdateGroupMembershipAsync(responseMembership.Id, request); Assert.AreEqual("admin", updatedMembership.Role, "Membership role was not updated correctly"); - + // Get all memberships for the given groups var memberships = await _client.GroupsManager.GetAllGroupMembershipsForGroupAsync(newGroup.Id); diff --git a/Box.V2.Test.Integration/BoxLegalHoldPoliciesManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxLegalHoldPoliciesManagerTestIntegration.cs index 0802cbe5a..1628356a8 100644 --- a/Box.V2.Test.Integration/BoxLegalHoldPoliciesManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxLegalHoldPoliciesManagerTestIntegration.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Models; @@ -7,6 +8,7 @@ namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxLegalHoldPoliciesManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -25,7 +27,7 @@ public async Task LegalHoldPoliciesWorkflow_ValidRequest() PolicyName = policyName, Description = description, FilterStartedAt = filterStarted, - FilterEndedAt = filterEnded + FilterEndedAt = filterEnded }); Assert.IsNotNull(legalHold.Id); diff --git a/Box.V2.Test.Integration/BoxMetadataManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxMetadataManagerTestIntegration.cs index 39f3e6680..0f1516886 100644 --- a/Box.V2.Test.Integration/BoxMetadataManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxMetadataManagerTestIntegration.cs @@ -3,11 +3,13 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxMetadataManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -72,7 +74,7 @@ public async Task Metadata_DeleteTemplate_LiveSession() await _client.MetadataManager.GetMetadataTemplate(scope, templateKey); } catch (BoxException e) { - Assert.IsNotNull(e); + Assert.IsNotNull(e); } Assert.IsTrue(templateIsDeleted, "Failed to delete metadata template"); } diff --git a/Box.V2.Test.Integration/BoxRecentItemsManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxRecentItemsManagerTestIntegration.cs index aeb6b801e..2825c9bdd 100644 --- a/Box.V2.Test.Integration/BoxRecentItemsManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxRecentItemsManagerTestIntegration.cs @@ -1,9 +1,11 @@ -using Box.V2.Models; +using System.Diagnostics.CodeAnalysis; +using Box.V2.Models; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxRecentItemsManagerTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxResourceManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxResourceManagerTestIntegration.cs index d0c68f501..5f03a245a 100644 --- a/Box.V2.Test.Integration/BoxResourceManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxResourceManagerTestIntegration.cs @@ -1,6 +1,7 @@ using System; using System.Threading.Tasks; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using Box.V2.Auth; using Box.V2.Request; using Box.V2.Config; @@ -11,6 +12,7 @@ namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public abstract class BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxRetentionPoliciesManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxRetentionPoliciesManagerTestIntegration.cs index 9264f2d4d..60d4a2ca3 100644 --- a/Box.V2.Test.Integration/BoxRetentionPoliciesManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxRetentionPoliciesManagerTestIntegration.cs @@ -2,11 +2,13 @@ using Box.V2.Models.Request; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxRetentionPoliciesManagerTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxSearchManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxSearchManagerTestIntegration.cs index ad1f59341..e06be8fe3 100644 --- a/Box.V2.Test.Integration/BoxSearchManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxSearchManagerTestIntegration.cs @@ -4,12 +4,14 @@ using System.Threading.Tasks; using System.Linq; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using Box.V2.Models.Request; using Box.V2.Exceptions; using Box.V2.Config; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxSearchManagerTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxSharedItemsManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxSharedItemsManagerTestIntegration.cs index 28192dd53..d27269954 100644 --- a/Box.V2.Test.Integration/BoxSharedItemsManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxSharedItemsManagerTestIntegration.cs @@ -1,12 +1,14 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxSharedItemsManagerTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxStoragePoliciesManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxStoragePoliciesManagerTestIntegration.cs index 51e3586af..a65f4273a 100644 --- a/Box.V2.Test.Integration/BoxStoragePoliciesManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxStoragePoliciesManagerTestIntegration.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Models; @@ -7,6 +8,7 @@ namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxStoragePoliciesManagerTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxTasksManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxTasksManagerTestIntegration.cs index 5ae855150..30c0f3646 100644 --- a/Box.V2.Test.Integration/BoxTasksManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxTasksManagerTestIntegration.cs @@ -3,9 +3,11 @@ using Box.V2.Models; using Box.V2.Models.Request; using System; +using System.Diagnostics.CodeAnalysis; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxTasksManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -63,7 +65,7 @@ public async Task TasksWorkflow_ValidRequest() Assert.AreEqual(1, taskAssignments.Entries.Count, "Task assignmnet number are incorrect!"); Assert.AreEqual(taskAssignments.Entries[0].Id, uTaskAssignment.Id, "Task assignment id are incorrect!"); - // Delete task assignment + // Delete task assignment await _client.TasksManager.DeleteTaskAssignmentAsync(taskAssignment.Id); // Delete task diff --git a/Box.V2.Test.Integration/BoxTermsOfServicesManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxTermsOfServicesManagerTestIntegration.cs index 4c07662ca..4ddc12fb6 100644 --- a/Box.V2.Test.Integration/BoxTermsOfServicesManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxTermsOfServicesManagerTestIntegration.cs @@ -3,9 +3,11 @@ using Box.V2.Models; using Box.V2.Models.Request; using System; +using System.Diagnostics.CodeAnalysis; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxTermsOfServicesManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -15,7 +17,7 @@ public async Task CreateTermsOfServices_ValidResponse() { var termsOfService = await _client.TermsOfServiceManager.CreateTermsOfServicesAsync(new BoxTermsOfServicesRequest { - Status = "enabled", + Status = "enabled", TosType = "managed", Text = "Test Text" }); diff --git a/Box.V2.Test.Integration/BoxTokenExchangeTestIntegration.cs b/Box.V2.Test.Integration/BoxTokenExchangeTestIntegration.cs index 648a7e01f..e9c2a238d 100644 --- a/Box.V2.Test.Integration/BoxTokenExchangeTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxTokenExchangeTestIntegration.cs @@ -5,10 +5,12 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxTokenExchangeTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxUsersManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxUsersManagerTestIntegration.cs index 4685f6a01..a9cb1620b 100644 --- a/Box.V2.Test.Integration/BoxUsersManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxUsersManagerTestIntegration.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Models; @@ -6,6 +7,7 @@ namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxUsersManagerTestIntegration : BoxResourceManagerTestIntegration { @@ -38,7 +40,7 @@ public async Task ExternalAppUserId_LiveSession_ValidResponse() return; } - // Create + // Create var userRequest = new BoxUserRequest { Name = "AppUser ExtId Test", diff --git a/Box.V2.Test.Integration/BoxWebLinkManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxWebLinkManagerTestIntegration.cs index 048c90b8c..b1078d7ef 100644 --- a/Box.V2.Test.Integration/BoxWebLinkManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxWebLinkManagerTestIntegration.cs @@ -1,10 +1,12 @@ using Box.V2.Models; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxWebLinkManagerTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test.Integration/BoxWebhooksManagerTestIntegration.cs b/Box.V2.Test.Integration/BoxWebhooksManagerTestIntegration.cs index dfebd28eb..9b5a555a3 100644 --- a/Box.V2.Test.Integration/BoxWebhooksManagerTestIntegration.cs +++ b/Box.V2.Test.Integration/BoxWebhooksManagerTestIntegration.cs @@ -1,11 +1,13 @@ using Box.V2.Models; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Threading.Tasks; namespace Box.V2.Test.Integration { + [ExcludeFromCodeCoverage] [TestClass] public class BoxWebhooksManagerTestIntegration : BoxResourceManagerTestIntegration { diff --git a/Box.V2.Test/AuthRepositoryTest.cs b/Box.V2.Test/AuthRepositoryTest.cs index 7e2b512b0..6bfc9a192 100644 --- a/Box.V2.Test/AuthRepositoryTest.cs +++ b/Box.V2.Test/AuthRepositoryTest.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Box.V2.Auth; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using Box.V2.Exceptions; using System.Linq; using Box.V2.Request; @@ -11,10 +12,10 @@ namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class AuthRepositoryTest : BoxResourceManagerTest { - [TestMethod] [TestCategory("CI-UNIT-TEST")] [ExpectedException(typeof(BoxException))] @@ -100,11 +101,11 @@ public async Task RefreshSession_MultipleThreadsSameAccessToken_SameSession() /*** Arrange ***/ int numTasks = 1000; - int count = 0; + int count = 0; // Increments the access token each time a call is made to the API Handler.Setup(h => h.ExecuteAsync(It.IsAny())) - .Returns(() => Task.FromResult>(new BoxResponse() + .Returns(() => Task.FromResult>(new BoxResponse() { Status = ResponseStatus.Success, ContentString = "{\"access_token\": \""+ count + "\",\"expires_in\": 3600,\"token_type\": \"bearer\",\"refresh_token\": \"J7rxTiWOHMoSC1isKZKBZWizoRXjkQzig5C6jFgCVJ9bUnsUfGMinKBDLZWP9BgR\"}" diff --git a/Box.V2.Test/BoxCollaborationsManagerTest.cs b/Box.V2.Test/BoxCollaborationsManagerTest.cs index 16019669a..571157d81 100644 --- a/Box.V2.Test/BoxCollaborationsManagerTest.cs +++ b/Box.V2.Test/BoxCollaborationsManagerTest.cs @@ -1,3 +1,4 @@ +using System.Diagnostics.CodeAnalysis; using Box.V2.Managers; using Box.V2.Models; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -6,6 +7,7 @@ namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxCollaborationsManagerTest : BoxResourceManagerTest { @@ -107,7 +109,7 @@ public async Task GetCollaboration_ValidResponse_ValidCollaboration() Assert.AreEqual("17738362", collab.CreatedBy.Id); Assert.AreEqual("sean@box.com", collab.CreatedBy.Login); } - + [TestMethod] [TestCategory("CI-UNIT-TEST")] public async Task GetPendingCollaboration_ValidResponse_ValidEntries() @@ -163,7 +165,7 @@ public async Task GetPendingCollaboration_ValidResponse_ValidEntries() Assert.AreEqual("collaboration", collaborations.Entries[0].Type); Assert.AreEqual("user", collaborations.Entries[0].AccessibleBy.Type); Assert.AreEqual("181216415", collaborations.Entries[0].AccessibleBy.Id); - Assert.AreEqual("collab@example.com", collaborations.Entries[0].InviteEmail); + Assert.AreEqual("collab@example.com", collaborations.Entries[0].InviteEmail); } [TestMethod] diff --git a/Box.V2.Test/BoxCollectionsManagerTest.cs b/Box.V2.Test/BoxCollectionsManagerTest.cs index 485c54afc..25b74b6f3 100644 --- a/Box.V2.Test/BoxCollectionsManagerTest.cs +++ b/Box.V2.Test/BoxCollectionsManagerTest.cs @@ -6,10 +6,12 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxCollectionsManagerTest : BoxResourceManagerTest { @@ -378,4 +380,4 @@ public async Task GetCollectionItems_ValidResponse() } } -} \ No newline at end of file +} diff --git a/Box.V2.Test/BoxCommentsManagerTest.cs b/Box.V2.Test/BoxCommentsManagerTest.cs index d983cfad6..5ed0b815e 100644 --- a/Box.V2.Test/BoxCommentsManagerTest.cs +++ b/Box.V2.Test/BoxCommentsManagerTest.cs @@ -1,4 +1,5 @@ -using Box.V2.Managers; +using System.Diagnostics.CodeAnalysis; +using Box.V2.Managers; using Box.V2.Models; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; @@ -7,6 +8,7 @@ namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxCommentsManagerTest : BoxResourceManagerTest { @@ -133,4 +135,4 @@ public async Task DeleteComment_ValidResponse_CommentDeleted() Assert.AreEqual(true, result); } } -} \ No newline at end of file +} diff --git a/Box.V2.Test/BoxEventsManagerTest.cs b/Box.V2.Test/BoxEventsManagerTest.cs index f6abbc46d..0d464b13b 100644 --- a/Box.V2.Test/BoxEventsManagerTest.cs +++ b/Box.V2.Test/BoxEventsManagerTest.cs @@ -3,6 +3,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using System; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Threading.Tasks; using System.Net.Http.Headers; @@ -11,6 +12,7 @@ namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxEventsManagerTest : BoxResourceManagerTest { diff --git a/Box.V2.Test/BoxFilesManagerTest.cs b/Box.V2.Test/BoxFilesManagerTest.cs index 0d7562640..fdf09d9e7 100644 --- a/Box.V2.Test/BoxFilesManagerTest.cs +++ b/Box.V2.Test/BoxFilesManagerTest.cs @@ -12,10 +12,12 @@ using System.Globalization; using Box.V2.Models.Request; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using Newtonsoft.Json.Linq; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxFilesManagerTest : BoxResourceManagerTest { @@ -51,7 +53,7 @@ public async Task UploadNewVersionUsingSessionAsync_ValidResponse() })); var fakeStream = new Mock(); - + BoxFile f = await _filesManager.UploadNewVersionUsingSessionAsync(fakeStream.Object, "fakeId", null, null, null); Assert.AreEqual("file", f.Type); Assert.AreEqual("5000948880", f.Id); @@ -1044,7 +1046,7 @@ public async Task RemoveWatermarkFromFile_ValidResponse_RemovedWatermark() //Response check Assert.AreEqual(true, result); - + } [TestMethod] diff --git a/Box.V2.Test/BoxFoldersManagerTest.cs b/Box.V2.Test/BoxFoldersManagerTest.cs index 91bb2c631..6748db132 100644 --- a/Box.V2.Test/BoxFoldersManagerTest.cs +++ b/Box.V2.Test/BoxFoldersManagerTest.cs @@ -8,12 +8,14 @@ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Net.Http.Headers; using System.Threading.Tasks; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxFoldersManagerTest : BoxResourceManagerTest { diff --git a/Box.V2.Test/BoxGroupsManagerTest.cs b/Box.V2.Test/BoxGroupsManagerTest.cs index 2aa9bbc61..3912cfb1d 100644 --- a/Box.V2.Test/BoxGroupsManagerTest.cs +++ b/Box.V2.Test/BoxGroupsManagerTest.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Managers; using System.Threading.Tasks; @@ -8,6 +9,7 @@ namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxGroupsManagerTest : BoxResourceManagerTest { @@ -27,8 +29,8 @@ public async Task GetGroupItems_ValidResponse_ValidGroups() .Returns(() => Task.FromResult>>(new BoxResponse>() { Status = ResponseStatus.Success, - ContentString = @"{""total_count"": 14, - ""entries"": [ {""type"": ""group"", ""id"": ""26477"", ""name"": ""adfasdf"", ""created_at"": ""2011-02-15T14:07:22-08:00"", ""modified_at"": ""2011-10-05T19:04:40-07:00"", ""invitability_level"": ""none""}, + ContentString = @"{""total_count"": 14, + ""entries"": [ {""type"": ""group"", ""id"": ""26477"", ""name"": ""adfasdf"", ""created_at"": ""2011-02-15T14:07:22-08:00"", ""modified_at"": ""2011-10-05T19:04:40-07:00"", ""invitability_level"": ""none""}, {""type"": ""group"", ""id"": ""1263"", ""name"": ""Enterprise Migration"", ""created_at"": ""2009-04-20T19:36:17-07:00"", ""modified_at"": ""2011-10-05T19:05:10-07:00"", ""invitability_level"": ""admins_only""}], ""limit"": 2, ""offset"": 0}" })) @@ -83,7 +85,7 @@ public async Task GetGroupItems_ValidResponse_NoGroups() .Returns(() => Task.FromResult>>(new BoxResponse>() { Status = ResponseStatus.Success, - ContentString = @"{""total_count"": 0, + ContentString = @"{""total_count"": 0, ""limit"": 2, ""offset"": 0}" })); @@ -246,7 +248,7 @@ public async Task DeleteMembership_ValidResponse_ValidGroup() var result = await _groupsManager.DeleteGroupMembershipAsync("1234"); Assert.IsTrue(result, "Unsuccessful group membership delete"); } - + [TestMethod] [TestCategory("CI-UNIT-TEST")] public async Task GetAllMemberships_ValidResponse_ValidGroup() @@ -258,12 +260,12 @@ public async Task GetAllMemberships_ValidResponse_ValidGroup() ContentString = @"{ ""total_count"": 2, ""entries"": [{ ""type"": ""group_membership"", ""id"": ""136639"", ""user"": {""type"": ""user"",""id"": ""6102564"", ""name"": """", ""login"": ""testanyregister@box.net""}, - ""group"": {""type"": ""group"",""id"": ""26477"",""name"": ""adfasdf""},""role"": ""member""}, + ""group"": {""type"": ""group"",""id"": ""26477"",""name"": ""adfasdf""},""role"": ""member""}, {""type"": ""group_membership"",""id"": ""273529"", ""user"": {""type"": ""user"",""id"": ""13928063"",""name"": ""spootie"",""login"": ""tevanspratt++39478@box.net""}, ""group"": {""type"": ""group"", ""id"": ""26477"", ""name"": ""adfasdf""}, ""role"": ""member""}], ""offset"": 0,""limit"": 100}" })); - + BoxCollection response = await _groupsManager.GetAllGroupMembershipsForGroupAsync("123"); Assert.AreEqual(2, response.TotalCount, "Wrong total count"); @@ -284,7 +286,7 @@ public async Task GetAllMemberships_ValidResponse_ValidUser() ContentString = @"{ ""total_count"": 2, ""entries"": [{ ""type"": ""group_membership"", ""id"": ""136639"", ""user"": {""type"": ""user"",""id"": ""6102564"", ""name"": """", ""login"": ""testanyregister@box.net""}, - ""group"": {""type"": ""group"",""id"": ""26477"",""name"": ""adfasdf""},""role"": ""member""}, + ""group"": {""type"": ""group"",""id"": ""26477"",""name"": ""adfasdf""},""role"": ""member""}, {""type"": ""group_membership"",""id"": ""273529"", ""user"": {""type"": ""user"",""id"": ""13928063"",""name"": ""spootie"",""login"": ""tevanspratt++39478@box.net""}, ""group"": {""type"": ""group"", ""id"": ""26477"", ""name"": ""adfasdf""}, ""role"": ""member""}], ""offset"": 0,""limit"": 100}" diff --git a/Box.V2.Test/BoxJWTAuthTest.cs b/Box.V2.Test/BoxJWTAuthTest.cs index 5779fc580..058e0a8e7 100644 --- a/Box.V2.Test/BoxJWTAuthTest.cs +++ b/Box.V2.Test/BoxJWTAuthTest.cs @@ -9,12 +9,14 @@ using Moq; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxJWTAuthTest : BoxResourceManagerTest { diff --git a/Box.V2.Test/BoxLegalHoldPoliciesManagerTest.cs b/Box.V2.Test/BoxLegalHoldPoliciesManagerTest.cs index 5dcd2ac90..8d3528e9b 100644 --- a/Box.V2.Test/BoxLegalHoldPoliciesManagerTest.cs +++ b/Box.V2.Test/BoxLegalHoldPoliciesManagerTest.cs @@ -5,10 +5,12 @@ using Moq; using Newtonsoft.Json; using System; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxLegalHoldPoliciesManagerTest : BoxResourceManagerTest { diff --git a/Box.V2.Test/BoxMetadataCascadePolicyManagerTest.cs b/Box.V2.Test/BoxMetadataCascadePolicyManagerTest.cs index 6e86c1469..049721f35 100644 --- a/Box.V2.Test/BoxMetadataCascadePolicyManagerTest.cs +++ b/Box.V2.Test/BoxMetadataCascadePolicyManagerTest.cs @@ -4,11 +4,13 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using System; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; using Newtonsoft.Json; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxMetadataCascadePolicyManagerTest : BoxResourceManagerTest { diff --git a/Box.V2.Test/BoxMetadataManagerTest.cs b/Box.V2.Test/BoxMetadataManagerTest.cs index 79b345eec..285949510 100644 --- a/Box.V2.Test/BoxMetadataManagerTest.cs +++ b/Box.V2.Test/BoxMetadataManagerTest.cs @@ -9,9 +9,11 @@ using Box.V2.Exceptions; using Newtonsoft.Json.Linq; using System; +using System.Diagnostics.CodeAnalysis; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxMetadataManagerTest : BoxResourceManagerTest { diff --git a/Box.V2.Test/BoxRequestTest.cs b/Box.V2.Test/BoxRequestTest.cs index 073246b69..6a73c68f8 100644 --- a/Box.V2.Test/BoxRequestTest.cs +++ b/Box.V2.Test/BoxRequestTest.cs @@ -1,10 +1,12 @@ using System; +using System.Diagnostics.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Utility; using Box.V2.Exceptions; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxRequestTest { diff --git a/Box.V2.Test/BoxResourceManagerTest.cs b/Box.V2.Test/BoxResourceManagerTest.cs index e5e9960af..9dccc5472 100644 --- a/Box.V2.Test/BoxResourceManagerTest.cs +++ b/Box.V2.Test/BoxResourceManagerTest.cs @@ -7,11 +7,13 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; +using System.Diagnostics.CodeAnalysis; using System.Text; using System.Reflection; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] public abstract class BoxResourceManagerTest { protected IBoxConverter Converter; diff --git a/Box.V2.Test/BoxResourcePluginsTest.cs b/Box.V2.Test/BoxResourcePluginsTest.cs index 8334810a7..a4ca330b9 100644 --- a/Box.V2.Test/BoxResourcePluginsTest.cs +++ b/Box.V2.Test/BoxResourcePluginsTest.cs @@ -1,9 +1,11 @@ using System; +using System.Diagnostics.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; using Box.V2.Managers; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxResourcePluginsTest : BoxResourceManagerTest { diff --git a/Box.V2.Test/BoxRetentionPoliciesManagerTest.cs b/Box.V2.Test/BoxRetentionPoliciesManagerTest.cs index ee0044708..115bac169 100644 --- a/Box.V2.Test/BoxRetentionPoliciesManagerTest.cs +++ b/Box.V2.Test/BoxRetentionPoliciesManagerTest.cs @@ -5,10 +5,12 @@ using Moq; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxRetentionPoliciesManagerTest : BoxResourceManagerTest { @@ -91,23 +93,23 @@ public async Task AssignPolicyToMetadataTemplate_OptionalParams_Success() { /*** Arrange ***/ string responseString = "{" - + "\"type\": \"retention_policy_assignment\"," - + "\"id\": \"3233225\"," + + "\"type\": \"retention_policy_assignment\"," + + "\"id\": \"3233225\"," + "\"retention_policy\": {" - + " \"type\": \"retention_policy\"," - + " \"id\": \"32131\"," + + " \"type\": \"retention_policy\"," + + " \"id\": \"32131\"," + " \"policy_name\": \"TaxDocuments\"" + "}," + "\"assigned_to\": {" - + " \"type\": \"metadata_template\"," + + " \"type\": \"metadata_template\"," + " \"id\": \"enterprise.my_template\"" - + "}," + + "}," + "\"assigned_by\": {" - + " \"type\": \"user\"," - + " \"id\": \"123456789\"," - + " \"name\": \"Sean\"," + + " \"type\": \"user\"," + + " \"id\": \"123456789\"," + + " \"name\": \"Sean\"," + " \"login\": \"sean@box.com\"" - + "}," + + "}," + "\"assigned_at\": \"2015-07-20T14:28:09-07:00\"," + "\"filter_fields\": [" + " {" diff --git a/Box.V2.Test/BoxSearchManagerTest.cs b/Box.V2.Test/BoxSearchManagerTest.cs index 04f2efd4d..675fa905d 100644 --- a/Box.V2.Test/BoxSearchManagerTest.cs +++ b/Box.V2.Test/BoxSearchManagerTest.cs @@ -3,10 +3,12 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using System; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxSearchManagerTest : BoxResourceManagerTest { diff --git a/Box.V2.Test/BoxServiceTest.cs b/Box.V2.Test/BoxServiceTest.cs index 3b42d86c7..5b36d611f 100644 --- a/Box.V2.Test/BoxServiceTest.cs +++ b/Box.V2.Test/BoxServiceTest.cs @@ -5,12 +5,14 @@ using Moq; using Box.V2.Auth; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using Box.V2.Request; using Box.V2.Converter; using Box.V2.Config; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxServiceTest { @@ -37,8 +39,7 @@ public BoxServiceTest() public async Task QueueTask_MultipleThreads_OrderedResponse() { /*** Arrange ***/ - int numTasks = 1000; - + const int numTasks = 1000; int count = 0; // Increments the access token each time a call is made to the API diff --git a/Box.V2.Test/BoxSharedItemsManagerTest.cs b/Box.V2.Test/BoxSharedItemsManagerTest.cs index f97c0fa6e..578fdeade 100644 --- a/Box.V2.Test/BoxSharedItemsManagerTest.cs +++ b/Box.V2.Test/BoxSharedItemsManagerTest.cs @@ -1,4 +1,5 @@ -using Box.V2.Managers; +using System.Diagnostics.CodeAnalysis; +using Box.V2.Managers; using Box.V2.Models; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; @@ -6,7 +7,7 @@ namespace Box.V2.Test { - + [ExcludeFromCodeCoverage] [TestClass] public class BoxSharedItemsManagerTest : BoxResourceManagerTest { @@ -118,7 +119,7 @@ public async Task SharedItems_ValidResponse_ValidSharedLink() Assert.AreEqual(1, result.PathCollection.TotalCount); Assert.AreEqual("https://www.box.com/s/vspke7y05sb214wjokpk", result.SharedLink.Url); Assert.AreEqual("17738362", result.CreatedBy.Id); - + } } -} \ No newline at end of file +} diff --git a/Box.V2.Test/BoxStoragePoliciesManagerTest.cs b/Box.V2.Test/BoxStoragePoliciesManagerTest.cs index f04e02fca..1c6fee4bd 100644 --- a/Box.V2.Test/BoxStoragePoliciesManagerTest.cs +++ b/Box.V2.Test/BoxStoragePoliciesManagerTest.cs @@ -6,11 +6,12 @@ using Moq; using Newtonsoft.Json; using System; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; - namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxStoragePoliciesManagerTest : BoxResourceManagerTest { @@ -405,7 +406,7 @@ public async Task Assign_DifferentStoragePolicy_ValidResponse() /*** Act ***/ var result = await _storagePoliciesManager.AssignAsync("1111", "7777"); - + //Response check Assert.AreEqual("storage_policy_assignment", result.Type); Assert.AreEqual("user_7777", result.Id); diff --git a/Box.V2.Test/BoxTasksManagerTest.cs b/Box.V2.Test/BoxTasksManagerTest.cs index a9c5b8cfd..cfc8b2ade 100644 --- a/Box.V2.Test/BoxTasksManagerTest.cs +++ b/Box.V2.Test/BoxTasksManagerTest.cs @@ -6,10 +6,12 @@ using Moq; using Newtonsoft.Json; using System; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxTasksManagerTest : BoxResourceManagerTest { diff --git a/Box.V2.Test/BoxTermsOfServiceManagerTest.cs b/Box.V2.Test/BoxTermsOfServiceManagerTest.cs index 1eafd0405..adcf6b4db 100644 --- a/Box.V2.Test/BoxTermsOfServiceManagerTest.cs +++ b/Box.V2.Test/BoxTermsOfServiceManagerTest.cs @@ -6,10 +6,12 @@ using Moq; using Newtonsoft.Json; using System; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxTermsOfServiceManagerTest : BoxResourceManagerTest { diff --git a/Box.V2.Test/BoxUsersManagerTest.cs b/Box.V2.Test/BoxUsersManagerTest.cs index 54098f8ac..49944e1f1 100644 --- a/Box.V2.Test/BoxUsersManagerTest.cs +++ b/Box.V2.Test/BoxUsersManagerTest.cs @@ -6,12 +6,14 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Threading.Tasks; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxUsersManagerTest : BoxResourceManagerTest { @@ -673,7 +675,7 @@ public async Task GetMembershipsForUser_ValidResponse_ValidFolder() Assert.IsNotNull(boxRequest); Assert.AreEqual(RequestMethod.Get, boxRequest.Method); Assert.AreEqual(UserUri + "13130406/memberships?offset=0&limit=100", boxRequest.AbsoluteUri.AbsoluteUri); - + // response Assert.IsNotNull(result); Assert.AreEqual("1560354", result.Entries[0].Id); diff --git a/Box.V2.Test/BoxWebLinksManagerTest.cs b/Box.V2.Test/BoxWebLinksManagerTest.cs index e454e9588..da4f4041e 100644 --- a/Box.V2.Test/BoxWebLinksManagerTest.cs +++ b/Box.V2.Test/BoxWebLinksManagerTest.cs @@ -5,10 +5,12 @@ using Moq; using Newtonsoft.Json; using System; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Box.V2.Test { + [ExcludeFromCodeCoverage] [TestClass] public class BoxWebLinkManagerTest : BoxResourceManagerTest {