This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Web.Tests.TestHelpers | |
| { | |
| using System; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Security.Principal; | |
| using System.Web; | |
| using System.Web.Mvc; | |
| using System.Web.Routing; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Test] | |
| public void ActionReturnsRedirectToRouteResult() | |
| { | |
| var result = this.controller.Action(); | |
| Assert.That(result, Is.TypeOf<RedirectToRouteResult>()); | |
| var routeResult = (RedirectToRouteResult)result; | |
| Assert.That(routeResult.RouteValues["area"], Is.EqualTo(string.Empty)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Web.Profiles.DomainToViewModel | |
| { | |
| using System.Linq; | |
| using System.Reflection; | |
| using AutoMapper; | |
| using Core.Extensions; | |
| public partial class DomainToViewModel : Profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Core | |
| { | |
| using Castle.Windsor; | |
| public static class ServiceLocator | |
| { | |
| public static IWindsorContainer Container { get; set; } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Core | |
| { | |
| public interface IResolver | |
| { | |
| T Resolve<T>(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Core.Security | |
| { | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| public class SecurityModule | |
| { | |
| public static string GetMd5Hash(string input) | |
| { | |
| var md5 = MD5.Create(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Test] | |
| public void RegisterArea_RoutesToArea() | |
| { | |
| var routes = new RouteCollection(); | |
| var areaRegistration = new FooAreaRegistration(); | |
| Assert.AreEqual("Foo", areaRegistration.AreaName); | |
| var areaRegistrationContext = new AreaRegistrationContext(areaRegistration.AreaName, routes); | |
| areaRegistration.RegisterArea(areaRegistrationContext); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Test] | |
| public void TestRoute_RoutesToCorrectRoute() | |
| { | |
| var routes = new RouteCollection(); | |
| var areaRegistration = new FooAreaRegistration(); | |
| Assert.AreEqual("Foo", areaRegistration.AreaName); | |
| var areaRegistrationContext = new AreaRegistrationContext(areaRegistration.AreaName, routes); | |
| areaRegistration.RegisterArea(areaRegistrationContext); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Tests.Domain.Builders | |
| { | |
| using System; | |
| using System.Collections.ObjectModel; | |
| using global::Core.Tests.Builders; | |
| using Domain; | |
| public class FooBuilder : TestDataBuilder<FooBuilder, Foo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DBCC CHECKIDENT ([Table], RESEED, X) |