public void Editable() { string tmpName = "DummyGradient"; var gradient = new Gradient(tmpName); Assert.IsTrue(gradient.Editable); gradient.Delete(); }
public void ForEach() { var gradient = new Gradient("DummyGradient"); int count = 0; gradient.ForEach((segment) => count++); Assert.AreEqual(gradient.NumberOfSegments, count); gradient.Delete(); }
public void NumberOfSegments() { string tmpName = "DummyGradient"; var gradient = new Gradient(tmpName); Assert.AreEqual(1, gradient.NumberOfSegments); gradient.Delete(); }
public void Duplicate() { string tmpName = "DummyGradient"; var original = new Gradient(tmpName); var copy = new Gradient(original); Assert.AreNotEqual(copy.Name, original.Name); copy.Delete(); original.Delete(); }
public void Constructor() { string tmpName = "DummyGradient"; var gradient = new Gradient(tmpName); var gradients = new GradientList(tmpName); Assert.AreEqual(1, gradients.Count); gradient.Delete(); Assert.AreEqual(0, (new GradientList(tmpName)).Count); }
public void GetLeftPosition() { string tmpName = "DummyGradient"; var gradient = new Gradient(tmpName); double position = gradient.SegmentGetLeftPosition(0); Assert.AreEqual(0.0, position); gradient.Delete(); }
public void GetMiddlePosition() { string tmpName = "DummyGradient"; var gradient = new Gradient(tmpName); double position = gradient.SegmentGetMiddlePosition(0); Assert.AreEqual(0.5, position); gradient.Delete(); }
public void Rename() { string tmpName = "DummyGradient"; string newName = "FooGradient"; var gradient = new Gradient(tmpName); Assert.AreEqual(newName, gradient.Rename(newName)); var copy = new Gradient(gradient); Assert.AreNotEqual(newName, copy.Rename(newName)); copy.Delete(); gradient.Delete(); }
public void SegmentGetLeftRightColor() { string tmpName = "DummyGradient"; var gradient = new Gradient(tmpName); double opacity; var rgb = gradient.SegmentGetLeftColor(0, out opacity); Assert.AreEqual(0.0, rgb.R); Assert.AreEqual(0.0, rgb.G); Assert.AreEqual(0.0, rgb.B); rgb = gradient.SegmentGetRightColor(0, out opacity); Assert.AreEqual(1.0, rgb.R); Assert.AreEqual(1.0, rgb.G); Assert.AreEqual(1.0, rgb.B); gradient.Delete(); }