package org.bench4q.master.unitTest.entity;

import java.util.List;

import org.bench4q.master.domain.entity.Script;
import org.bench4q.master.domain.repository.UserRepository;
import org.bench4q.share.helper.MarshalHelper;
import org.bench4q.share.models.agent.RunScenarioModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.multipart.MultipartFile;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:service-test-context.xml" })
public class Test_Script {
	@Autowired
	private UserRepository userRepository;

	@Test
	public void test_loadParamFiles() {
		Script.createScriptWithoutId("chen1",
				MarshalHelper.tryMarshal(new RunScenarioModel()),
				this.userRepository.getUser("admin"), makeUpMulityPartFiles());
	}

	private List<MultipartFile> makeUpMulityPartFiles() {
		// TODO: fulfill this
		return null;
	}
}
