// Path: src/test/java/com/github/agiledon/sisyphus/domain/json/User.java
// public class User {
//     public enum Gender { MALE, FEMALE };
// 
//     public static class Name {
//         private String _first, _last;
// 
//         public String getFirst() { return _first; }
//         public String getLast() { return _last; }
// 
//         public void setFirst(String s) { _first = s; }
//         public void setLast(String s) { _last = s; }
//     }
// 
//     private Gender _gender;
//     private Name _name;
//     private boolean _isVerified;
//     private byte[] _userImage;
// 
//     public Name getName() { return _name; }
//     public boolean isVerified() { return _isVerified; }
//     public Gender getGender() { return _gender; }
//     public byte[] getUserImage() { return _userImage; }
// 
//     public void setName(Name n) { _name = n; }
//     public void setVerified(boolean b) { _isVerified = b; }
//     public void setGender(Gender g) { _gender = g; }
//     public void setUserImage(byte[] b) { _userImage = b; }
// }
// 
// Path: src/main/java/com/github/agiledon/sisyphus/exception/NotSupportedException.java
// public class NotSupportedException extends RuntimeException {
//     public NotSupportedException(String message) {
//         super(message);
//     }
// }


import com.github.agiledon.sisyphus.domain.json.User;
import com.github.agiledon.sisyphus.exception.NotSupportedException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.util.List;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsNot.not;
package com.github.agiledon.sisyphus.junit;




public class DataProviderTest {
    @Rule
    public DataProvider dataProvider = new DataProvider();

    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    @Test
    @DataResource(resourceName = "user.json", targetClass = User.class)
    public void should_compose_User_data_with_json_format() {
        User user = dataProvider.provideData();
        assertThat(user, not(nullValue()));
        assertThat(user.getName().getFirst(), is("Joe"));
    }

    @Test
    @DataResource(resourceName = "userWithTemplate.json",
            templateName = "template/user.template",
            targetClass = User.class)
// Path: src/test/java/com/github/agiledon/sisyphus/domain/json/User.java
// public class User {
//     public enum Gender { MALE, FEMALE };
// 
//     public static class Name {
//         private String _first, _last;
// 
//         public String getFirst() { return _first; }
//         public String getLast() { return _last; }
// 
//         public void setFirst(String s) { _first = s; }
//         public void setLast(String s) { _last = s; }
//     }
// 
//     private Gender _gender;
//     private Name _name;
//     private boolean _isVerified;
//     private byte[] _userImage;
// 
//     public Name getName() { return _name; }
//     public boolean isVerified() { return _isVerified; }
//     public Gender getGender() { return _gender; }
//     public byte[] getUserImage() { return _userImage; }
// 
//     public void setName(Name n) { _name = n; }
//     public void setVerified(boolean b) { _isVerified = b; }
//     public void setGender(Gender g) { _gender = g; }
//     public void setUserImage(byte[] b) { _userImage = b; }
// }
// 
// Path: src/main/java/com/github/agiledon/sisyphus/exception/NotSupportedException.java
// public class NotSupportedException extends RuntimeException {
//     public NotSupportedException(String message) {
//         super(message);
//     }
// }


// Path: src/test/java/com/github/agiledon/sisyphus/junit/DataProviderTest.java
import com.github.agiledon.sisyphus.domain.json.User;
import com.github.agiledon.sisyphus.exception.NotSupportedException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.util.List;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsNot.not;

package com.github.agiledon.sisyphus.junit;




public class DataProviderTest {
    @Rule
    public DataProvider dataProvider = new DataProvider();

    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    @Test
    @DataResource(resourceName = "user.json", targetClass = User.class)
    public void should_compose_User_data_with_json_format() {
        User user = dataProvider.provideData();
        assertThat(user, not(nullValue()));
        assertThat(user.getName().getFirst(), is("Joe"));
    }

    @Test
    @DataResource(resourceName = "userWithTemplate.json",
            templateName = "template/user.template",
            targetClass = User.class)
    public void should_compose_user_data_by_parsing_template_file() {