Example #1
0
        public TestPlan CheckMeasureResult(ISpacePlan expected)
        {
            var actual = Element.Measure(OperationInput);

            Assert.AreEqual(expected.GetType(), actual.GetType());

            var expectedSize = expected as Size;
            var actualSize   = actual as Size;

            if (expectedSize != null)
            {
                Assert.AreEqual(expectedSize.Width, actualSize.Width);
                Assert.AreEqual(expectedSize.Height, actualSize.Height);
            }

            return(this);
        }
Example #2
0
 public TestPlan ExpectChildMeasure(string child, Size expectedInput, ISpacePlan returns)
 {
     return(AddOperation(new ChildMeasureOperationBase(child, expectedInput, returns)));
 }
Example #3
0
 public ChildMeasureOperationBase(string childId, Size input, ISpacePlan output)
 {
     ChildId = childId;
     Input   = input;
     Output  = output;
 }