public void TouchArea_union_smaller_object_gives_larger() { TouchArea larger = new TouchArea() { Type = "Rect", Value = "6x4" }; TouchArea smaller = new TouchArea() { Type = "Rect", Value = "2x2" }; TouchArea expected = new TouchArea() { Type = "Rect", Value = "6x4" }; larger.Union(smaller); Assert.IsTrue(larger.Equals(expected)); }
public void TouchArea_union_null_throws_exception() { TouchArea Target = new TouchArea(); TouchArea input = null; Target.Union(input); }
public void TouchArea_union_gives_largest_values_for_all_dimensions() { TouchArea target = new TouchArea() { Type = "Ellipse", Value = "2x4" }; TouchArea input = new TouchArea() { Type = "Ellipse", Value = "6x2" }; TouchArea expected = new TouchArea() { Type = "Ellipse", Value = "6x4" }; target.Union(input); Assert.IsTrue(target.Equals(expected)); }
public void TouchArea_union_different_type_throws_exception() { TouchArea target = new TouchArea(); ClosedLoop input = new ClosedLoop(); target.Union(input); }
public void TouchArea_union_different_type_gives_rect() { TouchArea target = new TouchArea() { Type = "Circle", Value = "4" }; TouchArea input = new TouchArea() { Type = "Ellipse", Value = "2x3" }; TouchArea expected = new TouchArea() { Type = "Rect", Value = "4x4" }; target.Union(input); Assert.IsTrue(target.Equals(expected)); }
public void TouchArea_same_types_union_gives_same() { TouchArea target = new TouchArea() { Type = "Circle", Value = "4" }; TouchArea value = new TouchArea() { Type = "Circle", Value = "6" }; target.Union(value); Assert.IsTrue( target.Equals(value)); }