Пример #1
0
        public void RegisterAllAreas() {
            // Arrange
            string[] expectedLoadedAreas = new string[] { "AreaRegistrationTest_AreaRegistration" };
            AnnotatedRouteCollection routes = new AnnotatedRouteCollection();
            MockBuildManager buildManager = new MockBuildManager(new Assembly[] { typeof(AreaRegistrationTest).Assembly });

            // Act
            AreaRegistration.RegisterAllAreas(routes, buildManager, null);

            // Assert
            CollectionAssert.AreEquivalent(expectedLoadedAreas, routes._areasLoaded);
        }
        public void RegisterAllAreas()
        {
            // Arrange
            string[] expectedLoadedAreas          = new string[] { "AreaRegistrationTest_AreaRegistration" };
            AnnotatedRouteCollection routes       = new AnnotatedRouteCollection();
            MockBuildManager         buildManager = new MockBuildManager(new Assembly[] { typeof(AreaRegistrationTest).Assembly });

            // Act
            AreaRegistration.RegisterAllAreas(routes, buildManager, null);

            // Assert
            Assert.Equal(expectedLoadedAreas, routes._areasLoaded.ToArray());
        }