JUnit testing for IO

前端 未结 1 508
轻奢々
轻奢々 2021-01-25 12:01

I am new here and new to junit testing. I have a class with two methods and I want to write unit tests for it. I am not sure how to start I read some basic tutorials but I am no

相关标签:
1条回答
  • 2021-01-25 12:21

    Just to give you a head start

    Create your test class that looks something like this

    import junit.framework.TestCase;
    
    public class CreateCSVTest extends TestCase {
    
        CreateCSV csv = new CreateCSV();
    
        public void testCreateCsv() {
            csv.createCSV("Pass an arraylist of type Signal", "pass a file");
            assertEquals("add your asserts here", "add your asserts here");
        }
    
    }
    
    0 讨论(0)
提交回复
热议问题