コード例 #1
0
 public override void OneTimeSetup()
 {
     _elementsBuilderInstanceType    = typeof(ElementsBuilder <dynamic>);
     _elementsBuilderInstanceFixture = this.Create <ElementsBuilder <dynamic> >(true);
     _elementsBuilderInstance        = _elementsBuilderInstanceFixture ?? this.Create <ElementsBuilder <dynamic> >(false);
     CurrentInstance = _elementsBuilderInstanceFixture;
     ConfigureIgnoringTests(); // Configure ignoring tests.
 }
コード例 #2
0
        public void AUT_ElementsBuilder_Constructor_Instantiation_With_Parameter_Test()
        {
            // Arrange
            var elements = this.CreateType <dynamic[]>();
            ElementsBuilder <dynamic> instance = null;
            Exception creationException        = null;

            // Act
            Action createAction = () => instance = new ElementsBuilder <dynamic>(elements);

            creationException = ActionAnalyzer.GetActionException(createAction);

            // Assert
            instance.ShouldNotBeNull();
            _elementsBuilderInstance.ShouldNotBeNull();
            _elementsBuilderInstanceFixture.ShouldNotBeNull();
            Should.NotThrow(createAction);
        }