package ru.rsdn.patterns.behavioral.observer.problems.thread;

import java.util.concurrent.CopyOnWriteArrayList;

import org.junit.Test;

import ru.rsdn.patterns.behavioral.observer.ISubscriber;

/**
 * Тестирование издателя со списком подписчиков на основе
 * java.util.concurrent.CopyOnWriteArrayList
 */
public class CopyOnWriteArrayListPublisherTest extends
		AbstractPublisherTest<CopyOnWriteArrayList<ISubscriber>> {
	public CopyOnWriteArrayListPublisherTest() {
		super(new CopyOnWriteArrayList<ISubscriber>());
	}

	@Override
	@Test(expected = ArrayIndexOutOfBoundsException.class)
	public void unsafeNotifyByCycle() {
		super.unsafeNotifyByCycle();
	}

	@Override
	@Test()
	public void unsafeNotifyByIterator() {
		super.unsafeNotifyByIterator();
	}
}
