예제 #1
0
            public void GetsCorrectChainFor2TierMove()
            {
                var orderer = new FieldOrderer
                              (
                    WarcraftVersion.BurningCrusade,
                    DBCInspector.GetVersionRelevantProperties(WarcraftVersion.BurningCrusade, typeof(TestDBCRecordWithMultipleMovedFields))
                    .ToList()
                              );

                var movedProperty = DBCInspector.GetRecordProperties(typeof(TestDBCRecordWithMultipleMovedFields))
                                    .First(p => p.Name == nameof(TestDBCRecordWithMultipleMovedFields.FieldA));

                var moveAttribute = DBCInspector.GetMostRecentPropertyMove(WarcraftVersion.BurningCrusade, movedProperty);

                var chain = orderer.GetPrecendenceChain(moveAttribute, new List <PropertyInfo>()).Select(p => p.Name);

                Assert.That(MultiMoveBCDependencyChainFieldA, Is.EquivalentTo(chain));
            }