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)); }
public void AddOneFactionTest() { var model = new BsFactions(_actors.Object); model.Add(_actor1.Object, BsFaction.Blue); Assert.IsFalse(model.AreAllies(_actor1.Object, _actor2.Object)); Assert.IsTrue(model.Contains(_actor1.Object, BsFaction.Blue)); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Red)); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Green)); model.Add(_actor1.Object, BsFaction.Blue); Assert.IsFalse(model.AreAllies(_actor1.Object, _actor2.Object)); Assert.IsTrue(model.Contains(_actor1.Object, BsFaction.Blue)); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Red)); Assert.IsFalse(model.Contains(_actor1.Object, BsFaction.Green)); }
public void AreAlliesGroupsTest() { var model = new BsFactions(_actors.Object); model.Add(_actor1.Object, BsFaction.Green | BsFaction.Blue); model.Add(_actor2.Object, BsFaction.Red | BsFaction.Blue); Assert.IsTrue(model.AreAllies(_actor1.Object, _actor2.Object)); }