Metria-Project / Metria-Test

0 stars 0 forks source link

suggestion of a test for the method _fixvalues in Line #2

Open cyromd opened 6 years ago

cyromd commented 6 years ago

under this input: line: X=2
the following output:
A.x=b.x=2 ; center=alfa=beta==(2,0) ; radius=0 is supposed to be seen

under this input: A=(2,0) e B=(2,6)
the following output:
_a=(2,0) e _b=(2,6) is supposed to be seen

under this input: A=(2,9) e B=(2,6)
the following output:
_a=(2,9) e _b=(2,6) is supposed to be seen

under this input: A=(2,0) B=(6,0) the following output:
_center=(4,0) ; _radius=2 ; alfa=(2,0) ; beta=(6,0) is supposed to be seen

under this input: A=(1,2) B=(2,sqrt(3)) the following output:
_radius=2 ; _center=(1,0) ; alfa=(-1,0) ; beta=(3,0) is supposed to be seen

under this input: B=(1,2) A=(2,sqrt(3)) the following output:
_a=(1,2) _b=(2,sqrt(3)) is supposed to be seen

Supitto commented 6 years ago

These test will be references as _1 to _6, it will come in a future commit once I have internet access in my computer

Supitto commented 6 years ago

===

Code _1 Place _2_hyperbolic_line.cs Process Create a new vertical line with X = 2 and call it l Check l.A.X == 2 l.B.X == 2 l.Center == new Point(2,0) l.Alfa == new Point(2,0) l.Beta == new Point(2,0) l.Radius == 2

===

Code _2 Place _2_hyperbolic_line.cs Process Create a new line from (2,0) and going to (2,6) it l Check l.A == new Point(2,0) l.B == new Point(2,6)

===

Code _3 Place _2_hyperbolic_line.cs Process Create a new line from (2,9) and going to (2,6) it l Check l.A == new Point(2,9) l.B == new Point(2,6)

===

Code _4 Place _2_hyperbolic_line.cs Process Create a new line from (2,0) and going to (6,0) it l Check l.Center == new Point(4,0) l.Alfa == new Point(2,0) l.Beta == new Point(6,0) l.Radius == 2

===

Code _5 Place _2_hyperbolic_line.cs Process Create a new line from (1,2) and going to (2,sqrt(3)) it l Check l.Center == new Point(1,0) l.Alfa == new Point(-1,0) l.Beta == new Point(3,0) l.Radius == 2

===

Code _6 Place _2_hyperbolic_line.cs Process Create a new line from (2,sqrt(3)) and going to (1,2) it l Check l.A == new Point(1,2) l.B == new Point(2,sqrt(2))

cyromd commented 6 years ago

No teste 1 a line l está errada, deveria ser: Line l = new Line(new Point(2,1), new Point(2, 2))

cyromd commented 6 years ago

no teste 9 o point a está errado, deveria ser: Point a = new Point(4, 3), b = new Point(5, 2 * Math.Sqrt(2))

cyromd commented 6 years ago

No teste 10 o radius está errado deveria ser radius==4

cyromd commented 6 years ago

No teste 1 deveria ser checado l.radius==0 No teste 3 deveria ser checado l.A==new Point(2,6) e l.B==new Point(2,9) No teste 6 deveria ser checado l.B==new Point(2,sqrt(3))

do mais, OK