Skip to content

Commit

Permalink
ResponseController created for system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioaniche committed Jul 7, 2010
1 parent 2ab00f9 commit 53ba1c3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Web/Controllers/ResponsesController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System.Web.Mvc;
using Restfulie.Server;
using Restfulie.Server.Results;

namespace Web.Controllers
{
[ActAsRestfulie]
public class ResponsesController : Controller
{
public virtual ActionResult Success()
{
return new Success();
}

public virtual ActionResult BadRequest()
{
return new BadRequest();
}

public virtual ActionResult Created()
{
return new Created();
}

public virtual ActionResult InternalServerError()
{
return new InternalServerError();
}

public virtual ActionResult NotFound()
{
return new NotFound();
}

public virtual ActionResult PreconditionFailed()
{
return new PreconditionFailed();
}

public virtual ActionResult SeeOther()
{
return new SeeOther(Url.Action("Success"));
}
}
}
1 change: 1 addition & 0 deletions Web/Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Controllers\ItemsController.cs" />
<Compile Include="Controllers\ResponsesController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
Expand Down

0 comments on commit 53ba1c3

Please sign in to comment.