Пример #1
0
            public void ReturnsFailedResultIfTypeIsEdgePageButNotPubliclyConstructable()
            {
                // Arrange
                var activator = new DefaultPageActivator();

                // Act
                var result = activator.ActivatePage(typeof(NonConstructableEdgePage), NullTrace.Instance);

                // Assert
                Assert.False(result.Success);
                Assert.Null(result.Page);
            }
Пример #2
0
            public void ReturnsSuccessfulResultIfTypeIsPubliclyConstructableEdgePage()
            {
                // Arrange
                var activator = new DefaultPageActivator();

                // Act
                var result = activator.ActivatePage(typeof(ConstructableEdgePage), NullTrace.Instance);

                // Assert
                Assert.True(result.Success);
                Assert.IsType<ConstructableEdgePage>(result.Page);
            }
Пример #3
0
            public void ReturnsFailedResultIfTypeIsEdgePageButHasNoPublicParameterlessCtor()
            {
                // Arrange
                var activator = new DefaultPageActivator();

                // Act
                var result = activator.ActivatePage(typeof(NoParameterlessConstructorEdgePage), NullTrace.Instance);

                // Assert
                Assert.False(result.Success);
                Assert.Null(result.Page);
            }