Beispiel #1
0
        public void Calculate_NoEnemies_ReturnsUnsuccessful()
        {
            // Arrange
            var calculator = new FirstEnemyActionTargetCalculator();

            var user            = TestHelpers.CreateBasicCharacter(name: "wire", team: "a");
            var otherCharacters = new[]
            {
                TestHelpers.CreateBasicCharacter(name: "the", team: "a"),
                TestHelpers.CreateBasicCharacter(name: "15th", team: "a"),
            };

            // Act
            var(success, targets) = calculator.Calculate(user, otherCharacters);

            // Assert
            Assert.Multiple(() =>
            {
                Assert.That(success, Is.False);
                Assert.That(targets, Is.Empty);
            });
        }
Beispiel #2
0
        public void Calculate_ReturnsFirstEnemy()
        {
            // Arrange
            var calculator = new FirstEnemyActionTargetCalculator();

            var user            = TestHelpers.CreateBasicCharacter(name: "wire", team: "a");
            var otherCharacters = new[]
            {
                TestHelpers.CreateBasicCharacter(name: "the", team: "a"),
                TestHelpers.CreateBasicCharacter(name: "15th", team: "b"),
            };

            // Act
            var(success, targets) = calculator.Calculate(user, otherCharacters);

            // Assert
            Assert.Multiple(() =>
            {
                Assert.That(success, Is.True);
                Assert.That(targets.First().Name, Is.EqualTo("15th"));
            });
        }