Skip to content

Commit fab42dc

Browse files
Code style fixes in MusicStore.Test StoreManagerControllerTest
1 parent 8ddda4a commit fab42dc

File tree

1 file changed

+33
-18
lines changed

1 file changed

+33
-18
lines changed

samples/MusicStore/MusicStore.Test/Controllers/StoreManagerControllerTest.cs

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
using Microsoft.AspNetCore.Mvc;
2-
using Microsoft.AspNetCore.Mvc.Rendering;
3-
using Microsoft.Extensions.Caching.Memory;
4-
using MusicStore.Areas.Admin.Controllers;
5-
using MusicStore.Models;
6-
using MyTested.AspNetCore.Mvc;
7-
using System;
8-
using System.Collections.Generic;
9-
using System.Linq;
10-
using System.Threading;
11-
using Xunit;
12-
13-
namespace MusicStore.Test.Controllers
1+
namespace MusicStore.Test.Controllers
142
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Threading;
7+
using Microsoft.AspNetCore.Mvc;
8+
using Microsoft.AspNetCore.Mvc.Rendering;
9+
using Microsoft.Extensions.Caching.Memory;
10+
using MusicStore.Areas.Admin.Controllers;
11+
using MusicStore.Models;
12+
using MyTested.AspNetCore.Mvc;
13+
using Xunit;
14+
1515
public class StoreManagerControllerTest
1616
{
1717
[Fact]
@@ -102,7 +102,10 @@ public void CreatePostShouldHaveValidateAntiForgeryTokenAndPostAttributes()
102102
{
103103
MyMvc
104104
.Controller<StoreManagerController>()
105-
.Calling(x => x.Create(new Album(), From.Services<IMemoryCache>(), CancellationToken.None))
105+
.Calling(x => x.Create(
106+
new Album(),
107+
From.Services<IMemoryCache>(),
108+
CancellationToken.None))
106109
.ShouldHave()
107110
.ActionAttributes(attr => attr
108111
.ValidatingAntiForgeryToken()
@@ -139,7 +142,10 @@ public void CreatePostShouldHaveInvalidModelStateAndReturnDefaultViewWhenPassedE
139142
{
140143
MyMvc
141144
.Controller<StoreManagerController>()
142-
.Calling(x => x.Create(new Album(), From.Services<IMemoryCache>(), CancellationToken.None))
145+
.Calling(x => x.Create(
146+
new Album(),
147+
From.Services<IMemoryCache>(),
148+
CancellationToken.None))
143149
.ShouldHave()
144150
.InvalidModelState()
145151
.AndAlso()
@@ -206,7 +212,10 @@ public void RemoveAlbumConfirmedShouldDeleteAlbum()
206212
{
207213
entities.AddRange(albums);
208214
}))
209-
.Calling(x => x.RemoveAlbumConfirmed(From.Services<IMemoryCache>(), albumId, CancellationToken.None))
215+
.Calling(x => x.RemoveAlbumConfirmed(
216+
From.Services<IMemoryCache>(),
217+
albumId,
218+
CancellationToken.None))
210219
.ShouldHave()
211220
.Data(data => data.WithEntities(context =>
212221
{
@@ -232,7 +241,10 @@ public void RemoveAlbumConfirmedShouldReturnNotFoundCalledWithNotExistingAlbumId
232241
{
233242
entities.AddRange(albums);
234243
}))
235-
.Calling(x => x.RemoveAlbumConfirmed(From.Services<IMemoryCache>(), albumId, CancellationToken.None))
244+
.Calling(x => x.RemoveAlbumConfirmed(
245+
From.Services<IMemoryCache>(),
246+
albumId,
247+
CancellationToken.None))
236248
.ShouldReturn()
237249
.NotFound();
238250
}
@@ -242,7 +254,10 @@ public void EditPostShouldHaveValidateAntiForgeryTokenAndPostAttributes()
242254
{
243255
MyMvc
244256
.Controller<StoreManagerController>()
245-
.Calling(x => x.Edit(From.Services<IMemoryCache>(), new Album(), CancellationToken.None))
257+
.Calling(x => x.Edit(
258+
From.Services<IMemoryCache>(),
259+
new Album(),
260+
CancellationToken.None))
246261
.ShouldHave()
247262
.ActionAttributes(attr => attr
248263
.ValidatingAntiForgeryToken()

0 commit comments

Comments
 (0)