/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sybit.education.taschengeldboerse.testService;

import com.sybit.education.taschengeldboerse.domain.Job;
import com.sybit.education.taschengeldboerse.testutil.AbstractDatabaseTest;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.junit.Test;
import com.sybit.education.taschengeldboerse.service.JobsService;
import static org.junit.Assert.assertEquals;


/**
 *
 * @author sat
 */
public class JobServiceTest extends AbstractDatabaseTest{
    
    @Autowired
    JobsService service;
    
    @Test
    public void testFindAll(){
        List<Job> jobList;
        jobList=service.findAll();
        assertEquals(1, jobList.size());
        
        Job job = jobList.get(0);
        assertEquals("Test Job", job.getBezeichnung());
    }

    @Override
    public String getDataset() {
        return "database/testJobService.xml";
    }
}

@@ -976,16 +976,402 @@
 ;%0A    %7D%0A
+    %0A    @Test%0A    public void testSaveJob() %7B%0A        Job job = new Job();%0A        job.setId(1);%0A        job.setOrt(%22Singen%22);%0A        job.setAnbieter(1);%0A        job.setDatum(%2201.01.2015%22);%0A        job.setBezeichnung(%22test%22);%0A        %0A        service.addJob(job);%0A        %0A        assertEquals(Integer.valueOf(1), job.getId());%0A        assertEquals(%22Singen%22, job.getOrt());%0A    %7D%0A    
 %0A    @Ov

test SaveJob