Commit 54eb4e5
committed
Address review feedback on #1459 tests
- Convert the closed-generic DerivedDependencyDecorator from a record to a
plain class for consistency with the other decorator types in the file.
- Add a decorator-chain regression test exercising the DecoratorContext
UpdateContext path: the outer decorator's more-derived dependency must
still resolve from the container when the chained instance (inner
decorator output) is not assignable to it. Fails with InvalidCastException
against the pre-fix middleware.
- Add a test asserting a clean DependencyResolutionException when the
more-derived dependency is unregistered (rather than InvalidCastException).
- Make the open-generic test self-contained with a purpose-built
IDerivedService<T> sub-interface instead of reusing shared test infra.1 parent 1cccb63 commit 54eb4e5
2 files changed
Lines changed: 93 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
248 | 278 | | |
249 | 279 | | |
250 | 280 | | |
| |||
267 | 297 | | |
268 | 298 | | |
269 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
270 | 347 | | |
271 | 348 | | |
272 | 349 | | |
| |||
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
929 | 934 | | |
930 | 935 | | |
931 | 936 | | |
932 | 937 | | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
933 | 942 | | |
934 | 943 | | |
935 | | - | |
| 944 | + | |
936 | 945 | | |
937 | 946 | | |
938 | 947 | | |
939 | 948 | | |
940 | 949 | | |
941 | | - | |
| 950 | + | |
942 | 951 | | |
943 | 952 | | |
944 | 953 | | |
| |||
954 | 963 | | |
955 | 964 | | |
956 | 965 | | |
957 | | - | |
| 966 | + | |
958 | 967 | | |
959 | | - | |
| 968 | + | |
960 | 969 | | |
961 | 970 | | |
962 | | - | |
| 971 | + | |
963 | 972 | | |
964 | 973 | | |
965 | 974 | | |
966 | 975 | | |
967 | 976 | | |
968 | 977 | | |
969 | 978 | | |
970 | | - | |
| 979 | + | |
971 | 980 | | |
972 | 981 | | |
973 | 982 | | |
| |||
0 commit comments