예제 #1
0
 public PanelPositioner(IAttachToHingeDeterminer attachToHingeDeterminer,
                        IRotationDeterminer rotationDeterminer,
                        IRectangleFactory rectangleFactory,
                        IRectangleRotator rectangleRotator,
                        IHingeOffsetApplier hingeOffsetApplier)
 {
     if (attachToHingeDeterminer == null)
     {
         throw new ArgumentNullException(nameof(attachToHingeDeterminer));
     }
     if (rotationDeterminer == null)
     {
         throw new ArgumentNullException(nameof(rotationDeterminer));
     }
     if (rectangleFactory == null)
     {
         throw new ArgumentNullException(nameof(rectangleFactory));
     }
     if (rectangleRotator == null)
     {
         throw new ArgumentNullException(nameof(rectangleRotator));
     }
     if (hingeOffsetApplier == null)
     {
         throw new ArgumentNullException(nameof(hingeOffsetApplier));
     }
     _attachToHingeDeterminer = attachToHingeDeterminer;
     _rotationDeterminer      = rotationDeterminer;
     _rectangleFactory        = rectangleFactory;
     _rectangleRotator        = rectangleRotator;
     _hingeOffsetApplier      = hingeOffsetApplier;
 }
예제 #2
0
 protected TestsForPanelPositioner()
 {
     _attachToHingeDeterminer = A.Fake <IAttachToHingeDeterminer>();
     _rotationDeterminer      = A.Fake <IRotationDeterminer>();
     _rectangleFactory        = A.Fake <IRectangleFactory>();
     _rectangleRotator        = A.Fake <IRectangleRotator>();
     _hingeOffsetApplier      = A.Fake <IHingeOffsetApplier>();
     _sut = new PanelPositioner(
         _attachToHingeDeterminer, _rotationDeterminer, _rectangleFactory,
         _rectangleRotator, _hingeOffsetApplier);
 }