A fabric for creating a constructor dependency of the system under test and applying some configuration rules to it.
Inheritance: IFabric
Example #1
0
        /// <summary>
        /// Creates a new instance of the <see cref="FabricContext"/> class.
        /// </summary>
        /// <param name="typeToBuild">
        /// Specifies the type to build.
        /// </param>
        /// <param name="mockingEngine">
        /// Specifies the mock factory.
        /// </param>
        /// <param name="container">
        /// Specifies the container.
        /// </param>
        /// <param name="fabric">
        /// Specifies the fabric.
        /// </param>
        public FabricContext(Type typeToBuild, IMockingEngine mockingEngine, IContainer container, Fabric fabric)
        {
            Guard.AgainstArgumentNull(typeToBuild, "typeToBuild");
            Guard.AgainstArgumentNull(mockingEngine, "mockingEngine");
            Guard.AgainstArgumentNull(container, "container");

            TypeToBuild    = typeToBuild;
            _mockingEngine = mockingEngine;
            _container     = container;
            _fabric        = fabric;
        }
Example #2
0
        /// <summary>
        /// Creates a new instance of the <see cref="FabricContext"/> class.
        /// </summary>
        /// <param name="typeToBuild">
        /// Specifies the type to build.
        /// </param>
        /// <param name="mockingEngine">
        /// Specifies the mock factory.
        /// </param>
        /// <param name="container">
        /// Specifies the container.
        /// </param>
        /// <param name="fabric">
        /// Specifies the fabric.
        /// </param>
        public FabricContext(Type typeToBuild, IMockingEngine mockingEngine, IContainer container, Fabric fabric)
        {
            Guard.AgainstArgumentNull(typeToBuild, "typeToBuild");
            Guard.AgainstArgumentNull(mockingEngine, "mockingEngine");
            Guard.AgainstArgumentNull(container, "container");

            TypeToBuild = typeToBuild;
            _mockingEngine = mockingEngine;
            _container = container;
            _fabric = fabric;
        }