package com.izouma.jmrh.repo;

import com.izouma.jmrh.domain.SmsRecord;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.ArrayList;
import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest
public class SmsRecordRepoTest {
    @Autowired
    private SmsRecordRepo smsRecordRepo;

    @Test
    public void testSmsRecord() {
        SmsRecord record = SmsRecord.builder()
                                    .build();
        smsRecordRepo.save(record);

        List<SmsRecord> list = new ArrayList<>();
        for (SmsRecord smsRecord : smsRecordRepo.findAll()) {
            list.add(smsRecord);
        }
        System.out.println(list);
    }


}