public void AddCreatures_WhenCreatureIdentifierIsNill_ShouldThrowArgumentNullException() { var creaturesFactoryStub = new Mock <ICreaturesFactory>(); var loggerStub = new Mock <ILogger>(); var sut = new Logic.Battles.BattleManager(null, loggerStub.Object); Assert.Throws <ArgumentNullException>(() => sut.AddCreatures(null, 1)); }
public void Attack_ShouldThrowArgumentException_WhenDefenderCreatureIdentifierIsNull() { //Arrange var creaturesFactoryStub = new Mock <ICreaturesFactory>(); var loggerStub = new Mock <ILogger>(); var sut = new Logic.Battles.BattleManager(creaturesFactoryStub.Object, loggerStub.Object); var identifier = CreatureIdentifier.CreatureIdentifierFromString("Angel(1)"); //Act & Assert Assert.Throws <ArgumentException>(() => sut.Attack(identifier, identifier)); }