package i5.las2peer.classLoaders.libraries;

import org.junit.Assert;
import org.junit.Test;

import i5.las2peer.classLoaders.helpers.LibraryIdentifier;

public class LoadedNetworkLibraryTest {

	@Test
	public void testXMLandBack() {
		try {
			LibraryIdentifier libId = new LibraryIdentifier("testlib", "4.2.1");
			LoadedNetworkLibrary noDeps = new LoadedNetworkLibrary(null, libId, null);
			String xml = noDeps.toXmlString();
			LoadedNetworkLibrary backNoDeps = LoadedNetworkLibrary.createFromXml(null, xml);
			Assert.assertEquals(noDeps.getIdentifier().toString(), backNoDeps.getIdentifier().toString());
			Assert.assertNotNull(backNoDeps.getDependencies());
		} catch (Exception e) {
			e.printStackTrace();
			Assert.fail(e.toString());
		}
	}

}

@@ -87,16 +87,75 @@
 .Test;%0A%0A
+import i5.las2peer.classLoaders.helpers.LibraryDependency;%0A
 import i
@@ -671,29 +671,35 @@
 %0A%09%09%09
-Assert.assertNotNull(
+LibraryDependency%5B%5D deps = 
 back
@@ -722,16 +722,86 @@
 encies()
+;%0A%09%09%09Assert.assertNotNull(deps);%0A%09%09%09Assert.assertEquals(0, deps.length
 );%0A%09%09%7D c

improve LoadedNetworkLibraryTest