Skip to content
Snippets Groups Projects
Commit 054e4a2b authored by buczekp's avatar buczekp
Browse files

[LMS-2171] minor: more tests

SVN: 20845
parent f84813cb
No related branches found
No related tags found
No related merge requests found
......@@ -119,6 +119,31 @@ public class HierarchicalContentProviderTest extends AssertJUnit
context.assertIsSatisfied();
}
@Test
void testAsContentFromFakeDataSetCodeFails()
{
final String dataSetCode = "FAKE_DS_CODE";
context.checking(new Expectations()
{
{
one(openbisService).tryGetDataSet(dataSetCode);
will(returnValue(null));
}
});
try
{
hierarchicalContentProvider.asContent(dataSetCode);
fail("expected IllegalArgumentException");
} catch (IllegalArgumentException ex)
{
assertEquals("Unknown data set " + dataSetCode, ex.getMessage());
}
context.assertIsSatisfied();
}
@Test
void testAsContentFromDataSetLocation()
{
......
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