public JewelInSkillTreeParser(
     PassiveTreeDefinition tree, IBuilderFactories builderFactories, ICoreParser coreParser)
 {
     _tree = tree;
     _transformationParser = CompositeTransformationJewelParser.Create(
         i => builderFactories.PassiveTreeBuilders.NodeEffectiveness(i).Value);
     _coreParser = coreParser;
 }
Ejemplo n.º 2
0
        public void TransformationResultIsEmptyGivenNoComponentMatches()
        {
            var component = Mock.Of <ITransformationJewelParser>(p => !p.IsTransformationJewelModifier(JewelModifier));
            var sut       = new CompositeTransformationJewelParser(component);

            var actual = sut.ApplyTransformation(JewelModifier, new PassiveNodeDefinition[0]);

            actual.Should().BeEmpty();
        }
Ejemplo n.º 3
0
        public void IsNoTransformationJewelModifierGivenNoComponentIs()
        {
            var component = Mock.Of <ITransformationJewelParser>(p => !p.IsTransformationJewelModifier(JewelModifier));
            var sut       = new CompositeTransformationJewelParser(component);

            var actual = sut.IsTransformationJewelModifier(JewelModifier);

            actual.Should().BeFalse();
        }
Ejemplo n.º 4
0
        public void TransformationResultIsThatOfMatchingComponentGivenAComponentMatches()
        {
            var expected      = new[] { new TransformedNodeModifier("", Mock.Of <IValueBuilder>()), };
            var nodesInRadius = new PassiveNodeDefinition[0];
            var component     = Mock.Of <ITransformationJewelParser>(p =>
                                                                     p.IsTransformationJewelModifier(JewelModifier) &&
                                                                     p.ApplyTransformation(JewelModifier, nodesInRadius) == expected);
            var sut = new CompositeTransformationJewelParser(component);

            var actual = sut.ApplyTransformation(JewelModifier, nodesInRadius);

            actual.Should().Equal(expected);
        }