Skip to content

Commit

Permalink
test: removing tests for insert/update
Browse files Browse the repository at this point in the history
Removed the invalid and outdated tests for the Insert/Update commands. Need to rewrite these.
  • Loading branch information
ducksoop committed Feb 13, 2024
1 parent ff34394 commit 3fee68c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 186 deletions.
124 changes: 0 additions & 124 deletions QuickbaseNet.UnitTests/QuickbaseClientTests/QuickbaseClientTests.cs

This file was deleted.

62 changes: 0 additions & 62 deletions QuickbaseNet.UnitTests/Tests/QuickbaseClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,68 +107,6 @@ public async Task QueryRecords_ReturnsErrorResponse_When5xxOccurs()
Assert.NotNull(actualResponse.QuickbaseError);
}

[Fact]
public async Task InsertRecords_ReturnsSuccessResponse_WhenCalled()
{
// Arrange
var request = new Builder().Build<InsertOrUpdateRecordRequest>();

// Act
var response = await _client.InsertRecords(request);

// Assert
Assert.True(response.IsSuccess);
Assert.NotNull(response.Response);
Assert.Null(response.Error);
}

[Fact]
public async Task InsertRecords_ReturnsErrorResponse_WhenFails()
{
// Arrange
SetupMockHandlerWithErrorResponse();
var request = new Builder().Build<InsertOrUpdateRecordRequest>();

// Act
var actualResponse = await _client.InsertRecords(request);

// Assert
Assert.False(actualResponse.IsSuccess);
Assert.Null(actualResponse.Response);
Assert.NotNull(actualResponse.Error);
}

[Fact]
public async Task UpdateRecords_ReturnsSuccessResponse_WhenCalled()
{
// Arrange
var request = new Builder().Build<InsertOrUpdateRecordRequest>();

// Act
var response = await _client.UpdateRecords(request);

// Assert
Assert.True(response.IsSuccess);
Assert.NotNull(response.Response);
Assert.Null(response.Error);
}

[Fact]
public async Task UpdateRecords_ReturnsErrorResponse_WhenFails()
{
// Arrange
SetupMockHandlerWithErrorResponse();
var request = new Builder().Build<InsertOrUpdateRecordRequest>();

// Act
var actualResponse = await _client.UpdateRecords(request);

// Assert
Assert.False(actualResponse.IsSuccess);
Assert.Null(actualResponse.Response);
Assert.NotNull(actualResponse.Error);
}

#region Helpers
private void SetupMockHandlerWithErrorResponse()
{
Expand Down

0 comments on commit 3fee68c

Please sign in to comment.