package de.adesso.jenkinshue.service;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import de.adesso.jenkinshue.TestCase;
import de.adesso.jenkinshue.common.service.HueService;

/**
 * 
 * @author wennier
 *
 */
public class HueServiceImplTest extends TestCase {

	@Autowired
	private HueService hueService;
	
	@Test
	public void testIpAreEqual() {
		String ip1 = "10.10.10.10";
		String ip2 = "10.10.10.10:80";
		String ip3 = "10.10.10.20:80";
		String ip4 = "10.10.10.20:45";
		assertTrue(hueService.ipAreEqual(ip1, ip2));
		assertFalse(hueService.ipAreEqual(ip2, ip3));
		assertTrue(hueService.ipAreEqual(ip3, ip4));
	}
	
}

@@ -116,24 +116,83 @@
 ssertTrue;%0A%0A
+import de.adesso.jenkinshue.common.hue.dto.FoundBridgeDTO;%0A
 import org.j
@@ -202,16 +202,16 @@
 t.Test;%0A
-
 import o
@@ -364,15 +364,38 @@
 e;%0A%0A
+import java.util.List;%0A%0A
 /**%0A *
- 
 %0A * 
@@ -513,18 +513,17 @@
 ervice;%0A
-%09
 %0A
+
 %09@Test%0A%09
@@ -773,24 +773,24 @@
 ip2, ip3));%0A
-
 %09%09assertTrue
@@ -826,13 +826,241 @@
 p4));%0A%09%7D
+%0A%0A%09@Test%0A%09public void testFindAllBridgesIsModifiable() %7B%0A%09%09List%3CFoundBridgeDTO%3E allBridges = hueService.findAllBridges();%0A%09%09allBridges.add(new FoundBridgeDTO());%0A%09%09allBridges.add(new FoundBridgeDTO());%0A%09%09allBridges.remove(0);%0A%09%7D
 %0A%09%0A%7D%0A

Test added