@@ -13,48 +13,48 @@ namespace ManagedCode.Database.Tests.CosmosTests;
13
13
//[Collection(nameof(CosmosTestContainer))]
14
14
public class CosmosCollectionTests : BaseCollectionTests < string , TestCosmosItem >
15
15
{
16
- public CosmosCollectionTests ( ) : base ( )
16
+ public CosmosCollectionTests ( ) : base ( new CosmosTestContainer ( ) )
17
17
{
18
18
}
19
19
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();
33
23
34
- public override async Task DeleteListOfItems_WhenItemsDontExist()
35
- {
36
- var baseMethod = () => base.DeleteListOfItems_WhenItemsDontExist();
24
+ await baseMethod.Should().ThrowExactlyAsync<DatabaseException>();
25
+ }
37
26
38
- await baseMethod.Should().ThrowExactlyAsync<DatabaseException>();
39
- }
27
+ public override async Task DeleteListOfItemsById_WhenItemsDontExist()
28
+ {
29
+ var baseMethod = () => base.DeleteListOfItemsById_WhenItemsDontExist();
40
30
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
+ }
47
33
48
- for (var i = 0; i < itemsCount; i++ )
34
+ public override async Task DeleteListOfItems_WhenItemsDontExist( )
49
35
{
50
- list.Add(CreateNewItem());
51
- }
36
+ var baseMethod = () => base.DeleteListOfItems_WhenItemsDontExist();
52
37
53
- await Collection.InsertAsync(list);
54
- // Act
55
- var isDeleted = await Collection.DeleteCollectionAsync();
38
+ await baseMethod.Should().ThrowExactlyAsync<DatabaseException>();
39
+ }
56
40
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
+ }*/
60
60
}
0 commit comments