package be.iminds.ilabt.jfed.experimenter_gui.tutorials;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import org.testng.Assert;
import org.testng.annotations.Test;

import java.io.IOException;

/**
 * User: twalcari
 * Date: 3/10/2016
 * Time: 15:41
 */
public class TutorialsTest {

    @Test
    public void deserialize() throws IOException {


        ObjectMapper mapper = new XmlMapper();

        Tutorials tutorials =   mapper.readValue(TutorialsTest.class.getResourceAsStream("tutorials.xml"), Tutorials.class);

        Assert.assertEquals(tutorials.getVersion(), "1.0");
        Assert.assertEquals(tutorials.getTutorials().size(), 1);




    }

}