Skip to content

Commit

Permalink
fix tests in catalog and basket (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
behdad088 authored Aug 14, 2024
1 parent e8a7d3f commit 9b773d5
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@ public async Task DeleteBasket_Deletes_Basket_From_Cache_And_PostgresDb_Returns_
public async Task DisposeAsync()
{
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData().ConfigureAwait(false);
await _apiSpecification.DisposeAsync().ConfigureAwait(false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,6 @@ public async Task GetBasket_Basket_Only_Exists_In_Redis_database_Should_Return_B
public async Task DisposeAsync()
{
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData().ConfigureAwait(false);
await _apiSpecification.DisposeAsync().ConfigureAwait(false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,6 @@ public async Task StoreBasket_Valid_Request_Saves_Data_With_Valid_TotalPrice(Sto
public async Task DisposeAsync()
{
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData().ConfigureAwait(false);
await _apiSpecification.DisposeAsync().ConfigureAwait(false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public async Task CreateProduct_With_Valid_Object_With_No_Id_Return_Created(Crea

public async Task DisposeAsync()
{
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData();
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData().ConfigureAwait(false);
await _apiSpecification.DisposeAsync().ConfigureAwait(false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public async Task DeleteProductById_Add_Product_To_Db_Check_The_Existance_And_De

public async Task DisposeAsync()
{
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData();
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData().ConfigureAwait(false);
await _apiSpecification.DisposeAsync().ConfigureAwait(false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public async Task GetProductById_Returns_The_Product()

public async Task DisposeAsync()
{
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData();
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData().ConfigureAwait(false);
await _apiSpecification.DisposeAsync().ConfigureAwait(false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public async Task GetList_With_With_Two_Items_In_Database_Should_Return_2_Items(

public async Task DisposeAsync()
{
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData();
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData().ConfigureAwait(false);
await _apiSpecification.DisposeAsync().ConfigureAwait(false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public async Task GetProductsByCategory_Save_Two_Catalog_With_Different_Category

public async Task DisposeAsync()
{
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData();
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData().ConfigureAwait(false);
await _apiSpecification.DisposeAsync().ConfigureAwait(false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ public async Task UpdateProduct_With_Valid_Object_Ok(UpdateProductRequest update

public async Task DisposeAsync()
{
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData();
await _apiSpecification.GetDocumentStore().Advanced.ResetAllData().ConfigureAwait(false);
await _apiSpecification.DisposeAsync().ConfigureAwait(false);
}
}
}

0 comments on commit 9b773d5

Please sign in to comment.