Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning from test package update #2022

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private async Task OneDriveSearchForTestFile(string fileName = "_excelTestResour
continue;
else
{
Assert.True(false, "Test cleanup is not removing the test Excel file from the test tenant. Please check the cleanup code.");
Assert.Fail("Test cleanup is not removing the test Excel file from the test tenant. Please check the cleanup code.");
}
}
}
Expand Down Expand Up @@ -98,9 +98,9 @@ internal async Task OneDriveDeleteTestFile(string fileId, int delayInMillisecond
catch (ODataError e)
{
if (e.Error.Code == "resourceModified")
Assert.True(false, "Error code: " + e.Error.Code + ", message: " + e.Error.Message);
Assert.Fail("Error code: " + e.Error.Code + ", message: " + e.Error.Message);
else
Assert.True(false, "Something happened. Error code: " + e.Error.Code);
Assert.Fail("Something happened. Error code: " + e.Error.Code);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public async Task ExtensionAddRoamingProfile()
{
if (e.Error.Message == "An extension already exists with given id.")
{
Assert.True(false, "The extension already exists. Delete the extension step missing." );
Assert.Fail("The extension already exists. Delete the extension step missing.");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public async Task GroupCreateTeam()
}
catch (ODataError e)
{
Assert.True(false, e.Error.ToString());
Assert.Fail(e.Error.ToString());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public async System.Threading.Tasks.Task MailSendMail()
}
catch (ApiException e)
{
Assert.True(false, "Something happened, check out a trace. Error code: " + e.Message);
Assert.Fail("Something happened, check out a trace. Error code: " + e.Message);
}
}

Expand Down Expand Up @@ -101,7 +101,7 @@ public async System.Threading.Tasks.Task MailSendMailWithFileAttachment()
}
catch (ApiException e)
{
Assert.True(false, "Something happened, check out a trace. Error code: " + e.Message);
Assert.Fail("Something happened, check out a trace. Error code: " + e.Message);
}
}

Expand Down Expand Up @@ -131,7 +131,7 @@ public async System.Threading.Tasks.Task MailGetMailWithFileAttachment()
}
catch (ApiException e)
{
Assert.True(false, "Something happened, check out a trace. Error code: " + e.Message);
Assert.Fail("Something happened, check out a trace. Error code: " + e.Message);
}
}

Expand All @@ -154,7 +154,7 @@ public async System.Threading.Tasks.Task MailNextPageRequest()
}
catch (ApiException e)
{
Assert.True(false, "Something happened, check out a trace. Error code: " + e.Message);
Assert.Fail("Something happened, check out a trace. Error code: " + e.Message);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public async Task GroupCreateExtension()
}
catch (ODataError e)
{
Assert.True(false, e.Error.ToString());
Assert.Fail(e.Error.ToString());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public async Task OneDriveDownloadLargeFile()
}
catch (ODataError e)
{
Assert.True(false, $"Something happened, check out a trace. Error code: {e.Error.Code}");
Assert.Fail($"Something happened, check out a trace. Error code: {e.Error.Code}");
}
}

Expand All @@ -153,7 +153,7 @@ public async Task OneDriveNextPageRequest()
}
catch (ODataError e)
{
Assert.True(false, "Something happened, check out a trace. Error code: " + e.Error.Code);
Assert.Fail("Something happened, check out a trace. Error code: " + e.Error.Code);
}
}

Expand All @@ -179,7 +179,7 @@ public async Task OneDriveGetContent()
}
catch (ODataError e)
{
Assert.True(false, "Something happened, check out a trace. Error code: " + e.Error.Code);
Assert.Fail("Something happened, check out a trace. Error code: " + e.Error.Code);
}
}

Expand Down Expand Up @@ -220,7 +220,7 @@ public async Task OneDriveGetSetPermissions()
}
catch (ODataError e)
{
Assert.True(false, "Something happened, check out a trace. Error code: " + e.Error.Code);
Assert.Fail("Something happened, check out a trace. Error code: " + e.Error.Code);
}
}

Expand All @@ -240,7 +240,7 @@ public async Task OneDriveSearchFile()
}
catch (ODataError e)
{
Assert.True(false, "Something happened, check out a trace. Error code: " + e.Error.Code);
Assert.Fail("Something happened, check out a trace. Error code: " + e.Error.Code);
}
}

Expand Down Expand Up @@ -269,7 +269,7 @@ public async Task OneDriveCreateSharingLink()
}
catch (ODataError e)
{
Assert.True(false, "Something happened, check out a trace. Error code: " + e.Error.Code);
Assert.Fail("Something happened, check out a trace. Error code: " + e.Error.Code);
}
}

Expand Down Expand Up @@ -319,7 +319,7 @@ public async Task OneDriveInvite()
}
catch (ODataError e)
{
Assert.True(false, "Something happened, check out a trace. Error code: " + e.Error.Code);
Assert.Fail("Something happened, check out a trace. Error code: " + e.Error.Code);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ public async Task OneNoteGetNotebooks()
}
catch (ApiException e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand All @@ -85,12 +85,12 @@ public async Task OneNoteListPages()
}
catch (ApiException e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand All @@ -113,12 +113,12 @@ public async Task OneNoteListSections()
}
catch (ApiException e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand All @@ -141,12 +141,12 @@ public async Task OneNoteGetSectionGroups()
}
catch (ApiException e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand All @@ -170,12 +170,12 @@ public async Task OneNoteGetNotebooksExpandSection()
}
catch (ApiException e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand All @@ -198,12 +198,12 @@ public async Task OneNoteGetRecentNotebooks()
}
catch (ApiException e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand Down Expand Up @@ -236,12 +236,12 @@ public async Task OneNotePagePreview()
}
catch (ApiException e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand All @@ -265,12 +265,12 @@ public async Task OneNoteGetResource()
}
catch (ApiException e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand All @@ -296,7 +296,7 @@ public async Task OneNoteTryCreateNotebookWithInvalidChars()

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand Down Expand Up @@ -324,7 +324,7 @@ public async Task OneNoteCreateNotebook()

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand Down Expand Up @@ -372,12 +372,12 @@ public async Task OneNoteAddPageHtmlWorkaround()
}
catch (ApiException e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand Down Expand Up @@ -425,12 +425,12 @@ public async Task OneNoteAddPageHtmlWithStreamWorkaround()
}
catch (ODataError e)
{
Assert.True(false, $"Error code: {e.Error.Code}");
Assert.Fail($"Error code: {e.Error.Code}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand Down Expand Up @@ -491,12 +491,12 @@ public async Task OneNoteAddPageMultipartWorkaround()
}
catch (ODataError e)
{
Assert.True(false, $"Error code: {e.Error.Code}");
Assert.Fail($"Error code: {e.Error.Code}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand Down Expand Up @@ -555,12 +555,12 @@ public async Task OneNoteUpdatePage()
}
catch (ODataError e)
{
Assert.True(false, $"Error code: {e.Error.Code}");
Assert.Fail($"Error code: {e.Error.Code}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand Down Expand Up @@ -677,12 +677,12 @@ public async Task OneNoteAddPageWithMultipart()
}
catch (ODataError e)
{
Assert.True(false, $"Error code: {e.Error.Code}");
Assert.Fail($"Error code: {e.Error.Code}");
}

catch (Exception e)
{
Assert.True(false, $"Error code: {e.Message}");
Assert.Fail($"Error code: {e.Message}");
}
}

Expand All @@ -703,7 +703,7 @@ public async Task It_accesses_a_sites_OneNote_notebooks()
}
catch (Exception)
{
Assert.True(false, "An unexpected exception was thrown. This test case failed.");
Assert.Fail("An unexpected exception was thrown. This test case failed.");
}
}
}
Expand Down
Loading