// Path: siden-core/src/main/java/ninja/siden/util/Publisher.java
// public class Publisher<E> {
// 
// 	List<Consumer<E>> listeners = Collections
// 			.synchronizedList(new ArrayList<>());
// 
// 	public void on(Consumer<E> fn) {
// 		this.listeners.add(fn);
// 	}
// 
// 	public void off(Consumer<E> fn) {
// 		this.listeners.remove(fn);
// 	}
// 
// 	public void post(E event) {
// 		for (Iterator<Consumer<E>> i = this.listeners.iterator(); i.hasNext();) {
// 			try {
// 				i.next().accept(event);
// 			} finally {
// 				i.remove();
// 			}
// 		}
// 	}
// }


import static org.junit.Assert.assertEquals;
import java.util.function.Consumer;
import ninja.siden.util.Publisher;
import org.junit.Before;
import org.junit.Test;
/*
 * Copyright 2015 SATO taichi
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package ninja.siden.util;





/**
 * @author taichi
 */
public class PublisherTest {

	Publisher<String> target;

	@Before
	public void setUp() throws Exception {
// Path: siden-core/src/main/java/ninja/siden/util/Publisher.java
// public class Publisher<E> {
// 
// 	List<Consumer<E>> listeners = Collections
// 			.synchronizedList(new ArrayList<>());
// 
// 	public void on(Consumer<E> fn) {
// 		this.listeners.add(fn);
// 	}
// 
// 	public void off(Consumer<E> fn) {
// 		this.listeners.remove(fn);
// 	}
// 
// 	public void post(E event) {
// 		for (Iterator<Consumer<E>> i = this.listeners.iterator(); i.hasNext();) {
// 			try {
// 				i.next().accept(event);
// 			} finally {
// 				i.remove();
// 			}
// 		}
// 	}
// }


// Path: siden-core/src/test/java/ninja/siden/util/PublisherTest.java
import static org.junit.Assert.assertEquals;
import java.util.function.Consumer;
import ninja.siden.util.Publisher;
import org.junit.Before;
import org.junit.Test;

/*
 * Copyright 2015 SATO taichi
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package ninja.siden.util;





/**
 * @author taichi
 */
public class PublisherTest {

	Publisher<String> target;

	@Before
	public void setUp() throws Exception {
		this.target = new Publisher<>();