public void RemoveTest() { var model = new BsFactions(_actors.Object); model.Add(_actor1.Object, BsFaction.Blue); model.Add(_actor1.Object, BsFaction.Red); model.Add(_actor1.Object, BsFaction.Green); model.Remove(_actor1.Object, BsFaction.Blue); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Blue)); Assert.IsTrue(model.Contains(_actor1.Object, BsFaction.Red)); Assert.IsTrue(model.Contains(_actor1.Object, BsFaction.Green)); model.Remove(_actor1.Object, BsFaction.Blue); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Blue)); Assert.IsTrue(model.Contains(_actor1.Object, BsFaction.Red)); Assert.IsTrue(model.Contains(_actor1.Object, BsFaction.Green)); model.Remove(_actor1.Object, BsFaction.Red); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Blue)); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Red)); Assert.IsTrue(model.Contains(_actor1.Object, BsFaction.Green)); model.Remove(_actor1.Object, BsFaction.Green); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Blue)); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Red)); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Green)); }
public void AreAlliesTest() { var model = new BsFactions(_actors.Object); model.Add(_actor1.Object, BsFaction.Blue); model.Add(_actor2.Object, BsFaction.Blue); Assert.IsTrue(model.AreAllies(_actor1.Object, _actor2.Object)); model.Remove(_actor2.Object, BsFaction.Blue); Assert.IsFalse(model.AreAllies(_actor1.Object, _actor2.Object)); }