Ejemplo n.º 1
0
        public void GetScreenRadius_SizeWidthIsOdd_ShouldNotAdjustRadius()
        {
            // Arrange
            var annoObject = new AnnoObject
            {
                Size   = new Size(5, 8),
                Radius = 10
            };
            var layoutObject = new LayoutObject(annoObject, coordinateHelper, null, null);

            // Act
            var screenRadius = layoutObject.GetScreenRadius(10);

            // Assert
            Assert.Equal(100, screenRadius);
        }
Ejemplo n.º 2
0
        public void GetScreenRadius_SizeHeightAndWidthAreOdd_ShouldAdjustRadius(double widthToSet, double heightToSet, double expectedRadius)
        {
            // Arrange
            var annoObject = new AnnoObject
            {
                Size   = new Size(widthToSet, heightToSet),
                Radius = 10
            };
            var layoutObject = new LayoutObject(annoObject, coordinateHelper, null, null);

            // Act
            var screenRadius = layoutObject.GetScreenRadius(10);

            // Assert
            Assert.Equal(expectedRadius, screenRadius);
        }