Пример #1
0
        public async Task SetProficiencyAsync_TooMany_ReturnFailure()
        {
            // Arrange
            var charProvider = new MockCharacterProvider();
            var statProvider = new MockStatisticProvider();

            var statOptions = new StatisticOptions
            {
                InitialAttributeMin         = 1,
                InitialAttributeMax         = 10,
                InitialAttributePoints      = 40,
                InitialAttributesAtMax      = 7,
                InitialAttributesProficient = 0
            };

            var controller = new StatisticController(charProvider, statProvider, new GenericProgressionStrategy(statProvider, statOptions));
            var character  = await charProvider.GetActiveCharacterAsync(1);

            await controller.SetStatisticAsync(1, "strength", 10);

            // Act
            var result = await controller.SetProficiencyAsync(1, "strength", true);

            // Assert
            Assert.Equal(GenericResult.NotEnoughPoints(), result);
        }