@@ -528,11 +528,26 @@ private void ExportSkinnedMesh(string fileToExport, out SkinnedMeshRenderer orig
528
528
Assert . IsNotNull ( exportedSkinnedMesh ) ;
529
529
}
530
530
531
- [ Test ]
532
- public void TestSkinnedMeshExport ( ) {
533
- // for now use this cowboy taken from the asset store as the test file
534
- // TODO: find a better/simpler test file
535
- var fbxPath = "FbxExporters/Editor/UnitTests/Models/Cowboy/cowboyMidPoly(riged).fbx" ;
531
+ public class SkinnedMeshTestDataClass
532
+ {
533
+ public static System . Collections . IEnumerable TestCases1 {
534
+ get {
535
+ // for now use this cowboy taken from the asset store as the test file
536
+ // TODO: find a better/simpler test file
537
+ yield return "Models/Cowboy/cowboyMidPoly(riged).fbx" ;
538
+ }
539
+ }
540
+ public static System . Collections . IEnumerable TestCases2 {
541
+ get {
542
+ yield return "Models/SimpleMan/SimpleMan.fbx" ;
543
+ }
544
+ }
545
+ }
546
+
547
+ [ Test , TestCaseSource ( typeof ( SkinnedMeshTestDataClass ) , "TestCases1" ) ]
548
+ public void TestSkinnedMeshExport ( string fbxPath ) {
549
+ fbxPath = FindPathInUnitTests ( fbxPath ) ;
550
+ Assert . That ( fbxPath , Is . Not . Null ) ;
536
551
537
552
SkinnedMeshRenderer originalSkinnedMesh , exportedSkinnedMesh ;
538
553
ExportSkinnedMesh ( fbxPath , out originalSkinnedMesh , out exportedSkinnedMesh ) ;
@@ -600,10 +615,10 @@ public void TestSkinnedMeshExport(){
600
615
Assert . IsNotNull ( expWeights ) ;
601
616
}
602
617
603
- [ Test ]
604
- public void TestBoneWeightExport ( )
605
- {
606
- var fbxPath = "FbxExporters/Editor/UnitTests/Models/SimpleMan/SimpleMan.fbx" ;
618
+ [ Test , TestCaseSource ( typeof ( SkinnedMeshTestDataClass ) , "TestCases2" ) ]
619
+ public void TestBoneWeightExport ( string fbxPath ) {
620
+ fbxPath = FindPathInUnitTests ( fbxPath ) ;
621
+ Assert . That ( fbxPath , Is . Not . Null ) ;
607
622
608
623
SkinnedMeshRenderer originalSkinnedMesh , exportedSkinnedMesh ;
609
624
ExportSkinnedMesh ( fbxPath , out originalSkinnedMesh , out exportedSkinnedMesh ) ;
0 commit comments