File tree Expand file tree Collapse file tree
samples/MusicStore/MusicStore.Test/Controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public void PostAddressAndPaymentShouldRedirectToCompleteWhenSuccessful()
6767 . WithAuthenticatedUser ( )
6868 . WithRouteData ( )
6969 . WithDbContext ( db => db
70- . WithEntities < MusicStoreContext > ( entities =>
70+ . WithEntities ( entities =>
7171 {
7272 var cartItems = CreateTestCartItems (
7373 cartId ,
@@ -121,7 +121,7 @@ public void CompleteShouldReturnViewWithCorrectIdWithCorrectOrder()
121121 . Controller < CheckoutController > ( )
122122 . WithAuthenticatedUser ( user => user . WithUsername ( "TestUser" ) )
123123 . WithDbContext ( dbContext =>
124- dbContext . WithSet < MusicStoreContext , Order > ( o => o . Add ( new Order
124+ dbContext . WithSet < Order > ( o => o . Add ( new Order
125125 {
126126 OrderId = 1 ,
127127 Username = "TestUser"
@@ -138,7 +138,7 @@ public void CompleteShouldReturnViewWithErrorWithIncorrectOrder()
138138 . Controller < CheckoutController > ( )
139139 . WithAuthenticatedUser ( user => user . WithUsername ( "TestUser" ) )
140140 . WithDbContext ( dbContext =>
141- dbContext . WithSet < MusicStoreContext , Order > ( o => o . Add ( new Order
141+ dbContext . WithSet < Order > ( o => o . Add ( new Order
142142 {
143143 OrderId = 1 ,
144144 Username = "AnotherUser"
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public void IndexShouldReturnTopSellingAlbumsAndSaveThenIntoCache()
1818 . WithOptions ( options => options
1919 . For < AppSettings > ( settings => settings . CacheDbResults = true ) )
2020 . WithDbContext ( dbContext => dbContext
21- . WithSet < MusicStoreContext , Album > ( albums => albums
21+ . WithSet < Album > ( albums => albums
2222 . AddRange ( TestAlbumDataProvider . GetAlbums ( ) ) ) )
2323 . Calling ( c => c . Index (
2424 From . Services < MusicStoreContext > ( ) ,
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public void IndexShouldReturnCartItemsWhenItemsInCart()
5252 . Controller < ShoppingCartController > ( )
5353 . WithSession ( session => session . WithEntry ( "Session" , cartId ) )
5454 . WithDbContext ( db => db
55- . WithEntities < MusicStoreContext > ( entities =>
55+ . WithEntities ( entities =>
5656 {
5757 var cartItems = CreateTestCartItems (
5858 cartId ,
@@ -82,7 +82,7 @@ public void AddToCartShouldAddItemsToCart()
8282 . Controller < ShoppingCartController > ( )
8383 . WithSession ( session => session . WithEntry ( "Session" , "CartId_A" ) )
8484 . WithDbContext ( db => db
85- . WithEntities < MusicStoreContext > ( entities => entities
85+ . WithEntities ( entities => entities
8686 . AddRange ( CreateTestAlbums ( itemPrice : 10 ) ) ) )
8787 . Calling ( c => c . AddToCart ( albumId ) )
8888 . ShouldReturn ( )
@@ -110,7 +110,7 @@ public void RemoveFromCartShouldRemoveItemFromCart()
110110 . Controller < ShoppingCartController > ( )
111111 . WithSession ( session => session . WithEntry ( "Session" , cartId ) )
112112 . WithDbContext ( db => db
113- . WithEntities < MusicStoreContext > ( entities =>
113+ . WithEntities ( entities =>
114114 {
115115 var cartItems = CreateTestCartItems ( cartId , unitPrice , numberOfItem ) ;
116116 entities . AddRange ( cartItems . Select ( n => n . Album ) . Distinct ( ) ) ;
You can’t perform that action at this time.
0 commit comments