Ejemplo n.º 1
0
        public void WedgeAngle_Can_Be_Constructed()
        {
            WedgeAngle wa = new WedgeAngle();

            Assert.True(wa.Value == 0);
            Assert.True(wa.WedgeAngleType == WedgeAngleType.Auto);
        }
Ejemplo n.º 2
0
        public void WedgeAngle_Can_Be_Constructed_Parameters(double value, WedgeAngleType type)
        {
            WedgeAngle wa = new WedgeAngle(value, type);

            Assert.True((value == wa.Value) &&
                         (type == wa.WedgeAngleType));
        }
Ejemplo n.º 3
0
        public void WedgeAngle_Equals_Object()
        {
            WedgeAngle wa = new WedgeAngle(0, WedgeAngleType.Angle);
            WedgeAngle wa2 = new WedgeAngle(0, WedgeAngleType.Angle);
            Assert.False(wa.Equals((object)null));

            Assert.True(wa.Equals((object)wa2));
        }
Ejemplo n.º 4
0
        public void WedgeAngle_Equality(double va1, WedgeAngleType t1, double va2, WedgeAngleType t2, bool expected)
        {
            WedgeAngle wa1 = new WedgeAngle(va1, t1);
            WedgeAngle wa2 = new WedgeAngle(va2, t2);

            bool b = (wa1 == wa2);

            Assert.True(b == expected);
        }
Ejemplo n.º 5
0
 public void WedgeAngle_Equals()
 {
     WedgeAngle wa = new WedgeAngle(0, WedgeAngleType.Angle);
     WedgeAngle wa2 = new WedgeAngle(0, WedgeAngleType.Angle);
     WedgeAngle wa3 = new WedgeAngle(90, WedgeAngleType.Angle);
     WedgeAngle wa4 = new WedgeAngle(0, WedgeAngleType.Star);
     Assert.True(wa.Equals(wa2));
     Assert.False(wa.Equals(wa3));
     Assert.False(wa.Equals(wa4));
 }
Ejemplo n.º 6
0
        public void WedgeAngle_HashCode()
        {
            WedgeAngle wa = new WedgeAngle(0, WedgeAngleType.Angle);
            WedgeAngle wa2 = new WedgeAngle(0, WedgeAngleType.Angle);
            WedgeAngle wa3 = new WedgeAngle(90, WedgeAngleType.Angle);

            Assert.True(wa.GetHashCode() == wa2.GetHashCode());
            Assert.False(wa.GetHashCode() == wa3.GetHashCode());
        }
Ejemplo n.º 7
0
        public void WedgeAngle_Auto_Cannot_Have_Value()
        {
            WedgeAngle wa = new WedgeAngle(90, WedgeAngleType.Auto);

            Assert.True(wa.Value == 0);
        }
Ejemplo n.º 8
0
        public void WedgeAngle_Value_Cannot_Be_Negative()
        {
            WedgeAngle wa = new WedgeAngle(-180, WedgeAngleType.Angle);

            Assert.True(wa.Value == 0);
        }
Ejemplo n.º 9
0
        public void WedgeAngle_ToString(double value, WedgeAngleType type, string expected)
        {
            WedgeAngle wa = new WedgeAngle(value, type);

            Assert.True(wa.ToString() == expected);
        }
Ejemplo n.º 10
0
 public void WedgeAngle_Is_Star(WedgeAngleType type, bool expected)
 {
     WedgeAngle wa = new WedgeAngle(0, type);
     Assert.True(wa.IsStar == expected);
 }
Ejemplo n.º 11
0
 public WedgeAngleCalculation(WedgeAngle wa, FrameworkElement e)
 {
     WedgeAngle = wa;
     Element = e;
 }