public void NegativeTest(int direction) { var param = new ParamInModel(20, 20, 0); var wire = new Wires(new Point(0, 0), direction, param.Length); Assert.Catch <Exception>(() => param.FindEndY(wire)); }
public void PositiveTest(int direction, int ans) { var param = new ParamInModel(20, 20, 0); var wire = new Wires(new Point(0, 0), direction, param.Length); var result = param.FindEndY(wire); Assert.AreEqual(ans, result); }
public void CreateTest(int wight, int height, int rank, int length, int radius) { var param = new ParamInModel(wight, height, rank); Assert.AreEqual(length, param.Length); Assert.AreEqual(radius, param.Radius); Assert.AreEqual(6, param.Offset.Length); Assert.That(param.Offset, Is.All.Not.Null); Assert.That(param.Offset, Is.Unique); }
public void CheckParamWires() { var param = new ParamInModel(20, 20, 0); var light = new LightsInModel(new Point(0, 0), true, 5); var direction = 0; light.AddWires(direction, param); Assert.AreEqual(light.Light.Coordinate, light.Wires[0].CoordinateStart); Assert.AreEqual(direction, light.Wires[0].Direction); Assert.AreEqual(param.Length, light.Wires[0].Length); }
public void CreateTest(int countWires) { var param = new ParamInModel(20, 20, 0); var light = new LightsInModel(new Point(0, 0), true, 5); for (int i = 0; i < countWires; i++) { light.AddWires(0, param); } Assert.That(light.Wires, Is.All.Not.Null); Assert.That(light.Wires, Is.All.TypeOf(typeof(Wires))); }