File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
samples/MusicStore/MusicStore.Test/Controllers Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public void PostAddressAndPaymentShouldRedirectToCompleteWhenSuccessful()
67
67
. WithAuthenticatedUser ( )
68
68
. WithRouteData ( )
69
69
. WithDbContext ( db => db
70
- . WithEntities < MusicStoreContext > ( entities =>
70
+ . WithEntities ( entities =>
71
71
{
72
72
var cartItems = CreateTestCartItems (
73
73
cartId ,
@@ -121,7 +121,7 @@ public void CompleteShouldReturnViewWithCorrectIdWithCorrectOrder()
121
121
. Controller < CheckoutController > ( )
122
122
. WithAuthenticatedUser ( user => user . WithUsername ( "TestUser" ) )
123
123
. WithDbContext ( dbContext =>
124
- dbContext . WithSet < MusicStoreContext , Order > ( o => o . Add ( new Order
124
+ dbContext . WithSet < Order > ( o => o . Add ( new Order
125
125
{
126
126
OrderId = 1 ,
127
127
Username = "TestUser"
@@ -138,7 +138,7 @@ public void CompleteShouldReturnViewWithErrorWithIncorrectOrder()
138
138
. Controller < CheckoutController > ( )
139
139
. WithAuthenticatedUser ( user => user . WithUsername ( "TestUser" ) )
140
140
. WithDbContext ( dbContext =>
141
- dbContext . WithSet < MusicStoreContext , Order > ( o => o . Add ( new Order
141
+ dbContext . WithSet < Order > ( o => o . Add ( new Order
142
142
{
143
143
OrderId = 1 ,
144
144
Username = "AnotherUser"
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public void IndexShouldReturnTopSellingAlbumsAndSaveThenIntoCache()
18
18
. WithOptions ( options => options
19
19
. For < AppSettings > ( settings => settings . CacheDbResults = true ) )
20
20
. WithDbContext ( dbContext => dbContext
21
- . WithSet < MusicStoreContext , Album > ( albums => albums
21
+ . WithSet < Album > ( albums => albums
22
22
. AddRange ( TestAlbumDataProvider . GetAlbums ( ) ) ) )
23
23
. Calling ( c => c . Index (
24
24
From . Services < MusicStoreContext > ( ) ,
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public void IndexShouldReturnCartItemsWhenItemsInCart()
52
52
. Controller < ShoppingCartController > ( )
53
53
. WithSession ( session => session . WithEntry ( "Session" , cartId ) )
54
54
. WithDbContext ( db => db
55
- . WithEntities < MusicStoreContext > ( entities =>
55
+ . WithEntities ( entities =>
56
56
{
57
57
var cartItems = CreateTestCartItems (
58
58
cartId ,
@@ -82,7 +82,7 @@ public void AddToCartShouldAddItemsToCart()
82
82
. Controller < ShoppingCartController > ( )
83
83
. WithSession ( session => session . WithEntry ( "Session" , "CartId_A" ) )
84
84
. WithDbContext ( db => db
85
- . WithEntities < MusicStoreContext > ( entities => entities
85
+ . WithEntities ( entities => entities
86
86
. AddRange ( CreateTestAlbums ( itemPrice : 10 ) ) ) )
87
87
. Calling ( c => c . AddToCart ( albumId ) )
88
88
. ShouldReturn ( )
@@ -110,7 +110,7 @@ public void RemoveFromCartShouldRemoveItemFromCart()
110
110
. Controller < ShoppingCartController > ( )
111
111
. WithSession ( session => session . WithEntry ( "Session" , cartId ) )
112
112
. WithDbContext ( db => db
113
- . WithEntities < MusicStoreContext > ( entities =>
113
+ . WithEntities ( entities =>
114
114
{
115
115
var cartItems = CreateTestCartItems ( cartId , unitPrice , numberOfItem ) ;
116
116
entities . AddRange ( cartItems . Select ( n => n . Album ) . Distinct ( ) ) ;
You can’t perform that action at this time.
0 commit comments