Skip to content

Commit 76305b1

Browse files
author
Oleksii Sokol
committed
test
1 parent 0f9ab94 commit 76305b1

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

ManagedCode.Database.Tests/CosmosTests/CosmosCollectionTests.cs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,48 +13,48 @@ namespace ManagedCode.Database.Tests.CosmosTests;
1313
//[Collection(nameof(CosmosTestContainer))]
1414
public class CosmosCollectionTests : BaseCollectionTests<string, TestCosmosItem>
1515
{
16-
public CosmosCollectionTests() : base()
16+
public CosmosCollectionTests() : base(new CosmosTestContainer())
1717
{
1818
}
1919

20-
/* public override async Task DeleteItemById_WhenItemDoesntExists()
21-
{
22-
var baseMethod = () => base.DeleteItemById_WhenItemDoesntExists();
23-
24-
await baseMethod.Should().ThrowExactlyAsync<DatabaseException>();
25-
}
26-
27-
public override async Task DeleteListOfItemsById_WhenItemsDontExist()
28-
{
29-
var baseMethod = () => base.DeleteListOfItemsById_WhenItemsDontExist();
30-
31-
await baseMethod.Should().ThrowExactlyAsync<DatabaseException>();
32-
}
20+
/* public override async Task DeleteItemById_WhenItemDoesntExists()
21+
{
22+
var baseMethod = () => base.DeleteItemById_WhenItemDoesntExists();
3323
34-
public override async Task DeleteListOfItems_WhenItemsDontExist()
35-
{
36-
var baseMethod = () => base.DeleteListOfItems_WhenItemsDontExist();
24+
await baseMethod.Should().ThrowExactlyAsync<DatabaseException>();
25+
}
3726
38-
await baseMethod.Should().ThrowExactlyAsync<DatabaseException>();
39-
}
27+
public override async Task DeleteListOfItemsById_WhenItemsDontExist()
28+
{
29+
var baseMethod = () => base.DeleteListOfItemsById_WhenItemsDontExist();
4030
41-
[Fact]
42-
public override async Task DeleteCollectionAsync()
43-
{
44-
// Arrange
45-
int itemsCount = 5;
46-
List<TestCosmosItem> list = new();
31+
await baseMethod.Should().ThrowExactlyAsync<DatabaseException>();
32+
}
4733
48-
for (var i = 0; i < itemsCount; i++)
34+
public override async Task DeleteListOfItems_WhenItemsDontExist()
4935
{
50-
list.Add(CreateNewItem());
51-
}
36+
var baseMethod = () => base.DeleteListOfItems_WhenItemsDontExist();
5237
53-
await Collection.InsertAsync(list);
54-
// Act
55-
var isDeleted = await Collection.DeleteCollectionAsync();
38+
await baseMethod.Should().ThrowExactlyAsync<DatabaseException>();
39+
}
5640
57-
// Assert
58-
isDeleted.Should().BeTrue();
59-
}*/
41+
[Fact]
42+
public override async Task DeleteCollectionAsync()
43+
{
44+
// Arrange
45+
int itemsCount = 5;
46+
List<TestCosmosItem> list = new();
47+
48+
for (var i = 0; i < itemsCount; i++)
49+
{
50+
list.Add(CreateNewItem());
51+
}
52+
53+
await Collection.InsertAsync(list);
54+
// Act
55+
var isDeleted = await Collection.DeleteCollectionAsync();
56+
57+
// Assert
58+
isDeleted.Should().BeTrue();
59+
}*/
6060
}

0 commit comments

Comments
 (0)