private static EmbeddedResourceController InitializeEmbeddedResourceController()
 {
     var controller = new EmbeddedResourceController();
     var routeData = new RouteData();
     routeData.DataTokens.Add("area", "FooArea");
     controller.ControllerContext = new ControllerContext(MvcMockHelpers.DynamicHttpContextBase(), routeData, controller);
     return controller;
 }
        private void VerifyEmbeddedResourceControllerReturnEmbeddedImageForCustomPath(EmbeddedResourceController resourceController)
        {
            // act
            var result = resourceController.Index("arrow.gif", "images") as FileStreamResult;

            // assert
            result.FileStream.ShouldNotBeNull();
            result.ContentType.ShouldEqual("image/gif");
        }
        private void VerifyEmbeddedResourceControllerReturn404ForNonexistantResource(EmbeddedResourceController resourceController)
        {
            // act
            var result = resourceController.Index("foobar.gif", null);

            // assert
            result.ShouldBeNull();
            resourceController.Response.StatusCode.ShouldEqual(404);
        }