Exemplo n.º 1
0
        public void ConstructorShouldSetCorrectValues()
        {
            int cx = 84;
            int cy = 64;
            int radius = 32;

            QuarterCircle sut = new UpperLeftQuarterCircle(cx, cy, radius);

            Assert.Equal(cx, sut.CX);            
            Assert.Equal(cy, sut.CY);            
            Assert.Equal(radius, sut.Radius);
        }
Exemplo n.º 2
0
        public void ConstructorOfUpperLeftQShouldSetCorrectValues()
        {
            //upper left quarter of a circle inscribed in a square with sides 64.
            int cx = 64;
            int cy = 64;
            int radius = 32;
            
            QuarterCircle sut = new UpperLeftQuarterCircle(cx, cy, radius);

            Assert.Equal(ShapeType.UpperLeftQuarterCircle, sut.ShapeType);
            Assert.Equal(cx - radius, sut.X);        
            Assert.Equal(cy - radius, sut.Y);        
            Assert.Equal(radius, sut.Width);         
            Assert.Equal(radius, sut.Height);    
        }