public void TestInsert() { var manager = new ActuatorManager(); var actuator1 = new TestActuator(ActionSpec.MakeDiscrete(new[] { 1, 2, 3, 4 }), "actuator1"); var actuator2 = new TestActuator(ActionSpec.MakeDiscrete(new[] { 1, 2, 3 }), "actuator2"); manager.Add(actuator1); Assert.IsTrue(manager.NumDiscreteActions == 4); Assert.IsTrue(manager.SumOfDiscreteBranchSizes == 10); manager.Insert(0, actuator2); Assert.IsTrue(manager.NumDiscreteActions == 7); Assert.IsTrue(manager.SumOfDiscreteBranchSizes == 16); Assert.IsTrue(manager.IndexOf(actuator2) == 0); }