File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Assets/FbxExporters/Editor/UnitTests Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -214,17 +214,22 @@ public void MapNameToSourceTest()
214
214
var capsule3 = GameObject . CreatePrimitive ( PrimitiveType . Capsule ) ;
215
215
var sphere3 = GameObject . CreatePrimitive ( PrimitiveType . Sphere ) ;
216
216
217
+ capsule3 . transform . parent = cube3 . transform ;
218
+ sphere3 . transform . parent = cube3 . transform ;
219
+
217
220
var dictionaryBroken = ConvertToModel . MapNameToSourceRecursive ( cube , cube3 ) ;
218
221
219
222
//We expect these to pass because we've given it an identical game object, as it would have after a normal export.
220
223
Assert . AreSame ( capsule2 , dictionary [ capsule . name ] ) ;
221
224
Assert . AreSame ( sphere2 , dictionary [ sphere . name ] ) ;
222
- Assert . AreEqual ( quad2 , dictionary [ quad . name ] ) ;
225
+ Assert . AreSame ( quad2 , dictionary [ quad . name ] ) ;
223
226
224
227
//the dictionary size should be equal to the amount of children + the parent
225
- Assert . True ( dictionary . Count == cube . transform . childCount + 1 ) ;
228
+ Assert . True ( dictionaryBroken . Count == 4 ) ;
226
229
227
- Assert . AreNotSame ( quad , dictionaryBroken [ quad . name ] ) ;
230
+ Assert . IsNull ( dictionaryBroken [ quad . name ] ) ;
231
+ Assert . AreSame ( capsule3 , dictionaryBroken [ capsule . name ] ) ;
232
+ Assert . AreSame ( sphere3 , dictionaryBroken [ sphere . name ] ) ;
228
233
}
229
234
}
230
235
}
You can’t perform that action at this time.
0 commit comments