public void AddToAffectedObjects_PlusOneNewObject_GetNewAffectedListCount() { // arrange List <object> list = new List <object>(); list.Add(new object()); list.Add(new object()); object MyObj = new object(); LawOfPhysics law = new LawOfPhysics(list, 1000); // act law.AddToAffectedObjects(MyObj); // assert Assert.AreEqual(law.GetAffectedObjectsCount(), 3); }
public void LawOfPhysics_SetAffectedList_GetNewAffectedListCount() { // arrange List <object> list = new List <object>(); for (int i = 0; i < 10000; i++) { list.Add(new object()); } // act LawOfPhysics law = new LawOfPhysics(list, 1000); // assert Assert.AreEqual(law.GetAffectedObjectsCount(), 10000); }
public void RemoveAffectedObject_MinusOneNewObject_GetNewAffectedListCount() { // arrange List <object> list = new List <object>(); list.Add(new object()); list.Add(new object()); object MyObj = new object(); list.Add(MyObj); LawOfPhysics law = new LawOfPhysics(list, 1000); // act law.RemoveFromAffectedObject(MyObj); // assert Assert.AreEqual(law.GetAffectedObjectsCount(), 2); }