Skip to content
Snippets Groups Projects
Commit 92f2b005 authored by pkupczyk's avatar pkupczyk
Browse files

SP-159 / BIS-93: YeastLab: Implement a way to download template files as part...

SP-159 / BIS-93: YeastLab: Implement a way to download template files as part of the Custom Import functionality:
- added some junits

SVN: 26366
parent 3550cead
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,41 @@ public final class ProjectBOTest extends AbstractBOTest
return new ProjectBO(daoFactory, ManagerTestTool.EXAMPLE_SESSION, relationshipService);
}
@Test
public final void testLoadByPermId()
{
final ProjectBO projectBO = createProjectBO();
context.checking(new Expectations()
{
{
one(projectDAO).tryGetByPermID("20120814110011738-105");
will(returnValue(EXAMPLE_PROJECT));
}
});
projectBO.loadByPermId("20120814110011738-105");
ProjectPE project = projectBO.getProject();
assertEquals(EXAMPLE_PROJECT, project);
}
@Test(expectedExceptions = UserFailureException.class)
public final void testLoadByPermIdNonexistent()
{
final ProjectBO projectBO = createProjectBO();
context.checking(new Expectations()
{
{
one(projectDAO).tryGetByPermID("UNKNOWN-PERM-ID");
will(returnValue(null));
}
});
projectBO.loadByPermId("UNKNOWN-PERM-ID");
}
@Test
public void testDeleteProjectWithNoExperiments()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment