public void testNullParams() throws Exception { TradingRelationship t = null; try { provider.obtain(t); fail(); } catch (Exception e) { // expected } TradingRelationship[] ts = null; try { provider.obtain(ts); fail(); } catch (Exception e) { // expected } TradingRelationship[] containsNulls = new TradingRelationship[2]; assertTrue(containsNulls.length == 2); try { provider.obtain(containsNulls); fail(); } catch (Exception e) { // expected } }
public void testNoSeparator() throws Exception { TradingRelationship t = new TradingRelationship("src", "dest", "type"); provider.setSeparator(""); String result = provider.obtain(t); assertEquals(result, "srcdesttype"); }
public void testStandard() throws Exception { TradingRelationship t = new TradingRelationship("src", "dest", "type"); String result = provider.obtain(t); assertEquals(result, "src-dest-type"); }