@@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public
3131using OpenVectorFormat . AbstractReaderWriter ;
3232using OpenVectorFormat . GCodeReaderWriter ;
3333using OpenVectorFormat ;
34- using GCodeReaderWriter ;
34+ // using GCodeReaderWriter;
3535using OpenVectorFormat . OVFReaderWriter ;
3636using OpenVectorFormat . ReaderWriter . UnitTests ;
3737using System . IO ;
@@ -42,22 +42,29 @@ namespace UnitTests
4242 [ TestClass ]
4343 public class GCodeWriterTest
4444 {
45- private string ovfFilePath = "C: \\ Users \\ sambi \\ Source \\ Repos \\ OpenVectorFormatTools \\ ReaderWriter \\ UnitTests \\ TestFiles \\ bunny.ovf" ;
46- private string gcodeOutputPath = "C: \\ Users \\ sambi \\ Documents \\ temp \\ output3.gcode" ;
45+ private string ovfFilePath ;
46+ private string gcodeOutputPath ;
4747 private OVFFileReader ovfReader ;
4848 private GCodeWriter gcodeWriter ;
4949
5050 [ TestInitialize ]
5151 public void Setup ( )
5252 {
53- Assert . IsTrue ( File . Exists ( ovfFilePath ) , "OVF file not found" ) ;
53+ var dir = new DirectoryInfo ( "TestFiles" ) ;
54+ FileInfo [ ] files = dir . GetFiles ( "*.ovf" ) ;
55+
56+ Assert . IsTrue ( files . Length > 0 , "No OVF files found in TestFiles directory" ) ;
57+
58+ ovfFilePath = files [ 1 ] . FullName ;
59+ gcodeOutputPath = Path . Combine ( Path . GetTempPath ( ) , "output_test.gcode" ) ;
5460
5561 ovfReader = new OVFFileReader ( ) ;
5662 ovfReader . OpenJob ( ovfFilePath ) ;
5763
5864 gcodeWriter = new GCodeWriter ( ) ;
5965 }
6066
67+ //[DynamicData("GCodeFiles")]
6168 [ TestMethod ]
6269 public void Test_OVF_To_GCode ( )
6370 {
0 commit comments