示例#1
0
 public void Triangles_violating_triangle_inequality_are_illegal_3()
 {
     Assert.Throws <TriangleException>(() => Triangle.Kind(7, 3, 2));
 }
示例#2
0
 public void Triangles_with_no_size_are_illegal()
 {
     Assert.Throws <TriangleException>(() => Triangle.Kind(0, 0, 0));
 }
示例#3
0
 public void Triangles_with_negative_sides_are_illegal()
 {
     Assert.Throws <TriangleException>(() => Triangle.Kind(3, 4, -5));
 }
示例#4
0
 public void Scalene_triangles_have_no_equal_sides_in_descending_order_either()
 {
     Assert.That(Triangle.Kind(5, 4, 2), Is.EqualTo(Triangle.TriangleKind.Scalene));
 }
示例#5
0
 public void Very_small_triangles_are_legal()
 {
     Assert.That(Triangle.Kind(0.4m, 0.6m, 0.3m), Is.EqualTo(Triangle.TriangleKind.Scalene));
 }
示例#6
0
 public void Scalene_triangles_have_no_equal_sides()
 {
     Assert.That(Triangle.Kind(3, 4, 5), Is.EqualTo(Triangle.TriangleKind.Scalene));
 }
示例#7
0
 public void Scalene_triangles_have_no_equal_sides_at_a_larger_scale_too()
 {
     Assert.That(Triangle.Kind(10, 11, 12), Is.EqualTo(Triangle.TriangleKind.Scalene));
 }
示例#8
0
 public void Isosceles_triangles_have_in_fact_exactly_two_sides_equal()
 {
     Assert.That(Triangle.Kind(10, 10, 2), Is.EqualTo(Triangle.TriangleKind.Isosceles));
 }
示例#9
0
 public void Isosceles_triangles_have_two_first_sides_equal()
 {
     Assert.That(Triangle.Kind(4, 4, 3), Is.EqualTo(Triangle.TriangleKind.Isosceles));
 }
示例#10
0
 public void Isosceles_triangles_have_last_two_sides_equal()
 {
     Assert.That(Triangle.Kind(3, 4, 4), Is.EqualTo(Triangle.TriangleKind.Isosceles));
 }
示例#11
0
 public void Larger_equilateral_triangles_also_have_equal_sides()
 {
     Assert.That(Triangle.Kind(10, 10, 10), Is.EqualTo(Triangle.TriangleKind.Equilateral));
 }
示例#12
0
 public void Equilateral_triangles_have_equal_sides()
 {
     Assert.That(Triangle.Kind(2, 2, 2), Is.EqualTo(Triangle.TriangleKind.Equilateral));
 }