33using System . Web . Mvc ;
44using FunnelWeb . Model . Repositories ;
55using FunnelWeb . Tests . Web . Controllers ;
6- using FunnelWeb . Web . Application . Mime ;
6+ using FunnelWeb . Utilities ;
77using FunnelWeb . Web . Application . Mvc ;
88using FunnelWeb . Web . Areas . Admin . Controllers ;
99using NSubstitute ;
@@ -61,11 +61,8 @@ public void Upload()
6161
6262 var upload = new FileUpload ( file ) ;
6363
64- FileRepository . MapPath ( Arg . Any < string > ( ) ) . Returns ( "path" ) ;
65-
6664 var result = ( RedirectToRouteResult ) Controller . Upload ( "path" , false , upload ) ;
6765
68- FileRepository . Received ( ) . MapPath ( Arg . Is ( "path" ) ) ;
6966 FileRepository . Received ( ) . Save ( Arg . Is < Stream > ( stream ) , Arg . Is ( "path" ) , Arg . Is ( false ) ) ;
7067
7168 Assert . That ( result . RouteValues [ "Action" ] , Is . EqualTo ( "Index" ) ) ;
@@ -81,11 +78,8 @@ public void UploadAndUnzip()
8178
8279 var upload = new FileUpload ( file ) ;
8380
84- FileRepository . MapPath ( Arg . Any < string > ( ) ) . Returns ( "path" ) ;
85-
8681 var result = ( RedirectToRouteResult ) Controller . Upload ( "path" , true , upload ) ;
8782
88- FileRepository . Received ( ) . MapPath ( Arg . Is ( "path" ) ) ;
8983 FileRepository . Received ( ) . Save ( Arg . Is < Stream > ( stream ) , Arg . Is ( "path" ) , Arg . Is ( true ) ) ;
9084
9185 Assert . That ( result . RouteValues [ "Action" ] , Is . EqualTo ( "Index" ) ) ;
@@ -115,7 +109,6 @@ public void Delete()
115109 public void RenderExistingFile ( )
116110 {
117111 FileRepository . IsFile ( Arg . Is ( "file" ) ) . Returns ( true ) ;
118- FileRepository . MapPath ( Arg . Is ( "file" ) ) . Returns ( "file" ) ;
119112
120113 MimeTypeLookup . GetMimeType ( Arg . Any < string > ( ) ) . Returns ( "mime-type" ) ;
121114
@@ -136,7 +129,6 @@ public void Return404OnMissingFile()
136129 var result = Controller . Render ( "file" ) ;
137130
138131 FileRepository . Received ( ) . IsFile ( Arg . Is ( "file" ) ) ;
139- FileRepository . DidNotReceive ( ) . MapPath ( Arg . Any < string > ( ) ) ;
140132 MimeTypeLookup . DidNotReceive ( ) . GetMimeType ( Arg . Any < string > ( ) ) ;
141133
142134 Assert . IsInstanceOf ( typeof ( HttpNotFoundResult ) , result ) ;
0 commit comments