public void AreaNameTest()
 {
     InstallAreaRegistration target = new InstallAreaRegistration();
     string actual;
     string expected = "Install";
     actual = target.AreaName;
     Assert.AreEqual(expected,actual);
 }
        public void RegisterAreaTestWithMockContext()
        {
            MockRepository mocks = new MockRepository();
            //Mock the AreaRegistrationContext
            AreaRegistrationContext context = (AreaRegistrationContext)mocks.StrictMock(typeof(AreaRegistrationContext), "SymNet",new RouteCollection());
            InstallAreaRegistration target = new InstallAreaRegistration();

            using (mocks.Record()) {}

            //Play the test
            using (mocks.Playback())
            {
                target.RegisterArea(context);
            }

            Assert.AreEqual(1, context.Routes.Count);
        }
 public void RegisterAreaTestWithNullContext()
 {
     InstallAreaRegistration target = new InstallAreaRegistration();
     AreaRegistrationContext context = null;
     try
     {
         target.RegisterArea(context);
         Assert.Fail("Call to RegisterArea with null context should throw ArgumentNullException");
     }
     catch (Exception ex)
     {
         Assert.IsInstanceOfType(ex, typeof(ArgumentNullException));
     }
 }