@Test public void addLayerRejectsDuplicateLayer() { Layer topLayer = new Layer(); assertTrue(network.addLayer(topLayer)); assertFalse(network.addLayer(topLayer)); assertEquals(topLayer, network.getOutputLayer()); }
@Test public void addLayerAddsUniqueLayer() { Layer topLayer = new Layer(); assertTrue(network.addLayer(topLayer)); assertEquals(topLayer, network.getOutputLayer()); }
@Test public void addLayerToANullLayerList() { Layer topLayer = new Layer(); network.setLayers(null); assertTrue(network.addLayer(topLayer)); assertEquals(topLayer, network.getOutputLayer()); }
@Test public void addLayerDoesntAddNullLayer() { assertFalse(network.addLayer(null)); }