Commit 4c4134b
committed
Merge branch 'improvement/TopicRepository-IsNew-checks' into develop
Improved the `TopicRepository` base class to be more aware of `IsNew` conditions. In the case of loading a version of a new topic (8aacc5a) or saving a topic whose parent is new (4da0d43), an exception is thrown, as this is a completely unexpected scenario with no option for succeeding. The latter is validated via a unit test (854299a). In the case of `Move()` and `Delete()`, we instead just bypass their underlying `MoveTopic()` (bf1c584) and `DeleteTopic()` (7b46514) methods, which concrete implementations are responsible for implementing, thus allowing the basic validation and in-memory logic to be performed. This allows e.g. an `IsNew` topic to be deleted in memory, even though it obviously can't be deleted from the database. This satisfies the conditions of Issue #77.2 files changed
Lines changed: 24 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
913 | | - | |
914 | | - | |
915 | | - | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
| |||
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
927 | | - | |
| 927 | + | |
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
| |||
260 | 265 | | |
261 | 266 | | |
262 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
263 | 277 | | |
264 | 278 | | |
265 | 279 | | |
| |||
501 | 515 | | |
502 | 516 | | |
503 | 517 | | |
504 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
505 | 521 | | |
506 | 522 | | |
507 | 523 | | |
| |||
595 | 611 | | |
596 | 612 | | |
597 | 613 | | |
598 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
599 | 617 | | |
600 | 618 | | |
601 | 619 | | |
| |||
0 commit comments