public void Setup()
        {
            this._polygonCalculationHelper = new PolygonCalculationHelper(new LineIntersectionHelper());

            this._testCandidate = new PolygonTransformationHelper(
                new PointTransformationHelper(),
                this._polygonCalculationHelper);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PolygonTransformationHelper"/> class.
        /// </summary>
        public PolygonTransformationHelper(
            IPointTransformationHelper pointTransformationHelper,
            IPolygonCalculationHelper polygonCalculationHelper)
        {
            ArgumentChecks.AssertNotNull(pointTransformationHelper, nameof(pointTransformationHelper));
            ArgumentChecks.AssertNotNull(polygonCalculationHelper, nameof(polygonCalculationHelper));

            this._pointTransformationHelper = pointTransformationHelper;
            this._polygonCalculationHelper  = polygonCalculationHelper;
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ShapeFactory"/> class.
        /// </summary>
        public ShapeFactory(
            IPolygonTransformationHelper polygonTransformationHelper,
            IPolygonCalculationHelper polygonCalculationHelper,
            IBodyCalculationHelper bodyCalculationHelper)
        {
            ArgumentChecks.AssertNotNull(polygonTransformationHelper, nameof(polygonTransformationHelper));
            ArgumentChecks.AssertNotNull(polygonCalculationHelper, nameof(polygonCalculationHelper));
            ArgumentChecks.AssertNotNull(bodyCalculationHelper, nameof(bodyCalculationHelper));

            this._polygonTransformationHelper = polygonTransformationHelper;
            this._polygonCalculationHelper    = polygonCalculationHelper;
            this._bodyCalculationHelper       = bodyCalculationHelper;
        }