File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
LinkDotNet.Blog.IntegrationTests/Infrastructure/Persistence/Sql
LinkDotNet.Blog.UnitTests/Infrastructure/Persistence/InMemory Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -37,5 +37,16 @@ public async Task ShouldDelete()
37
37
items . Should ( ) . HaveCount ( 1 ) ;
38
38
items [ 0 ] . Id . Should ( ) . Be ( item2 . Id ) ;
39
39
}
40
+
41
+ [ Fact ]
42
+ public async Task NoopOnDeleteWhenEntryNotFound ( )
43
+ {
44
+ var item = new ProfileInformationEntryBuilder ( ) . WithKey ( "key1" ) . WithValue ( "value1" ) . Build ( ) ;
45
+ await ProfileRepository . AddAsync ( item ) ;
46
+
47
+ await ProfileRepository . DeleteAsync ( "SomeIdWhichHopefullyDoesNotExist" ) ;
48
+
49
+ ( await ProfileRepository . GetAllAsync ( ) ) . Should ( ) . HaveCount ( 1 ) ;
50
+ }
40
51
}
41
52
}
Original file line number Diff line number Diff line change @@ -45,5 +45,16 @@ public async Task ShouldDelete()
45
45
items . Should ( ) . HaveCount ( 1 ) ;
46
46
items [ 0 ] . Id . Should ( ) . Be ( item2 . Id ) ;
47
47
}
48
+
49
+ [ Fact ]
50
+ public async Task NoopOnDeleteWhenEntryNotFound ( )
51
+ {
52
+ var item = new ProfileInformationEntryBuilder ( ) . WithKey ( "key1" ) . WithValue ( "value1" ) . Build ( ) ;
53
+ await profileRepository . AddAsync ( item ) ;
54
+
55
+ await profileRepository . DeleteAsync ( "SomeIdWhichHopefullyDoesNotExist" ) ;
56
+
57
+ ( await profileRepository . GetAllAsync ( ) ) . Should ( ) . HaveCount ( 1 ) ;
58
+ }
48
59
}
49
60
}
You can’t perform that action at this time.
0 commit comments