// Path: cas-core/src/main/java/com/ghjansen/cas/core/ca/Combination.java
// public abstract class Combination<A extends State> {
// 
//     private A reference;
//     private List<A> neighborhood;
// 
//     protected Combination(A reference, A... neighbors) throws InvalidStateException {
//         if (reference == null || neighbors == null) {
//             throw new InvalidStateException();
//         }
//         this.reference = reference;
//         this.neighborhood = new ArrayList<A>();
//         for (int i = 0; i < neighbors.length; i++) {
//             this.neighborhood.add(neighbors[i]);
//         }
//     }
// 
//     public A getReferenceState() {
//         return this.reference;
//     }
// 
//     public List<A> getNeighborhood() {
//         return this.neighborhood;
//     }
// }
// 
// Path: cas-core/src/test/java/com/ghjansen/cas/core/ca/DimensionalCombination.java
// public final class DimensionalCombination extends Combination<DimensionalState> {
// 
// 	public DimensionalCombination(DimensionalState reference, DimensionalState... neighbors) throws InvalidStateException {
// 		super(reference, neighbors);
// 	}
// 
// }
// 
// Path: cas-core/src/test/java/com/ghjansen/cas/core/ca/DimensionalState.java
// public final class DimensionalState extends State {
// 
// 	public DimensionalState(String name, int value) {
// 		super(name, value);
// 	}
// 
// }
// 
// Path: cas-core/src/test/java/com/ghjansen/cas/core/ca/DimensionalTransition.java
// public final class DimensionalTransition extends Transition<DimensionalCombination,DimensionalState> {
// 
// 	public DimensionalTransition(DimensionalCombination combination, DimensionalState state) throws InvalidCombinationException, InvalidStateException {
// 		super(combination, state);
// 	}
// 
// }
// 
// Path: cas-core/src/main/java/com/ghjansen/cas/core/ca/State.java
// public abstract class State {
// 
//     private String name;
//     private int value;
// 
//     protected State(String name, int value) {
//         if (name == null) {
//             throw new IllegalArgumentException();
//         }
//         this.name = name;
//         this.value = value;
//     }
// 
//     public String getName() {
//         return this.name;
//     }
// 
//     public int getValue() {
//         return this.value;
//     }
// 
// }
// 
// Path: cas-core/src/main/java/com/ghjansen/cas/core/ca/Transition.java
// public abstract class Transition<O extends Combination, A extends State> {
// 
//     private O combination;
//     private A state;
// 
//     protected Transition(O combination, A state) throws InvalidCombinationException, InvalidStateException {
//         if (combination == null) {
//             throw new InvalidCombinationException();
//         }
//         if (state == null) {
//             throw new InvalidStateException();
//         }
//         this.combination = combination;
//         this.state = state;
//     }
// 
//     public O getCombination() {
//         return this.combination;
//     }
// 
//     public A getState() {
//         return this.state;
//     }
// 
// }
// 
// Path: cas-core/src/main/java/com/ghjansen/cas/core/exception/InvalidCombinationException.java
// public class InvalidCombinationException extends Exception {
// 
//     /**
//      * Serialization management
//      */
//     private static final long serialVersionUID = 884762124844706448L;
// 
// }
// 
// Path: cas-core/src/main/java/com/ghjansen/cas/core/exception/InvalidStateException.java
// public class InvalidStateException extends Exception {
// 
//     /**
//      * Serialization management
//      */
//     private static final long serialVersionUID = -7435119307025647318L;
// 
// }
// 
// Path: cas-core/src/main/java/com/ghjansen/cas/core/exception/InvalidTransitionException.java
// public class InvalidTransitionException extends Exception {
// 
//     /**
//      * Serialization management
//      */
//     private static final long serialVersionUID = 1848434169756515614L;
// 
// }


import org.junit.Assert;
import org.junit.Test;
import com.ghjansen.cas.core.ca.Combination;
import com.ghjansen.cas.core.ca.DimensionalCombination;
import com.ghjansen.cas.core.ca.DimensionalState;
import com.ghjansen.cas.core.ca.DimensionalTransition;
import com.ghjansen.cas.core.ca.State;
import com.ghjansen.cas.core.ca.Transition;
import com.ghjansen.cas.core.exception.InvalidCombinationException;
import com.ghjansen.cas.core.exception.InvalidStateException;
import com.ghjansen.cas.core.exception.InvalidTransitionException;
/*
 * CAS - Cellular Automata Simulator
 * Copyright (C) 2016  Guilherme Humberto Jansen
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.ghjansen.cas.core.physics;



/**
 * @author Guilherme Humberto Jansen (contact.ghjansen@gmail.com)
 */
public class CellTest {

	@Test
	public void dimensionalCellConstructor()
			throws InvalidStateException, InvalidCombinationException, InvalidTransitionException {
		final DimensionalState dimensionalBlackState = new DimensionalState("black", 0);
// Path: cas-core/src/main/java/com/ghjansen/cas/core/ca/Combination.java
// public abstract class Combination<A extends State> {
// 
//     private A reference;
//     private List<A> neighborhood;
// 
//     protected Combination(A reference, A... neighbors) throws InvalidStateException {
//         if (reference == null || neighbors == null) {
//             throw new InvalidStateException();
//         }
//         this.reference = reference;
//         this.neighborhood = new ArrayList<A>();
//         for (int i = 0; i < neighbors.length; i++) {
//             this.neighborhood.add(neighbors[i]);
//         }
//     }
// 
//     public A getReferenceState() {
//         return this.reference;
//     }
// 
//     public List<A> getNeighborhood() {
//         return this.neighborhood;
//     }
// }
// 
// Path: cas-core/src/test/java/com/ghjansen/cas/core/ca/DimensionalCombination.java
// public final class DimensionalCombination extends Combination<DimensionalState> {
// 
// 	public DimensionalCombination(DimensionalState reference, DimensionalState... neighbors) throws InvalidStateException {
// 		super(reference, neighbors);
// 	}
// 
// }
// 
// Path: cas-core/src/test/java/com/ghjansen/cas/core/ca/DimensionalState.java
// public final class DimensionalState extends State {
// 
// 	public DimensionalState(String name, int value) {
// 		super(name, value);
// 	}
// 
// }
// 
// Path: cas-core/src/test/java/com/ghjansen/cas/core/ca/DimensionalTransition.java
// public final class DimensionalTransition extends Transition<DimensionalCombination,DimensionalState> {
// 
// 	public DimensionalTransition(DimensionalCombination combination, DimensionalState state) throws InvalidCombinationException, InvalidStateException {
// 		super(combination, state);
// 	}
// 
// }
// 
// Path: cas-core/src/main/java/com/ghjansen/cas/core/ca/State.java
// public abstract class State {
// 
//     private String name;
//     private int value;
// 
//     protected State(String name, int value) {
//         if (name == null) {
//             throw new IllegalArgumentException();
//         }
//         this.name = name;
//         this.value = value;
//     }
// 
//     public String getName() {
//         return this.name;
//     }
// 
//     public int getValue() {
//         return this.value;
//     }
// 
// }
// 
// Path: cas-core/src/main/java/com/ghjansen/cas/core/ca/Transition.java
// public abstract class Transition<O extends Combination, A extends State> {
// 
//     private O combination;
//     private A state;
// 
//     protected Transition(O combination, A state) throws InvalidCombinationException, InvalidStateException {
//         if (combination == null) {
//             throw new InvalidCombinationException();
//         }
//         if (state == null) {
//             throw new InvalidStateException();
//         }
//         this.combination = combination;
//         this.state = state;
//     }
// 
//     public O getCombination() {
//         return this.combination;
//     }
// 
//     public A getState() {
//         return this.state;
//     }
// 
// }
// 
// Path: cas-core/src/main/java/com/ghjansen/cas/core/exception/InvalidCombinationException.java
// public class InvalidCombinationException extends Exception {
// 
//     /**
//      * Serialization management
//      */
//     private static final long serialVersionUID = 884762124844706448L;
// 
// }
// 
// Path: cas-core/src/main/java/com/ghjansen/cas/core/exception/InvalidStateException.java
// public class InvalidStateException extends Exception {
// 
//     /**
//      * Serialization management
//      */
//     private static final long serialVersionUID = -7435119307025647318L;
// 
// }
// 
// Path: cas-core/src/main/java/com/ghjansen/cas/core/exception/InvalidTransitionException.java
// public class InvalidTransitionException extends Exception {
// 
//     /**
//      * Serialization management
//      */
//     private static final long serialVersionUID = 1848434169756515614L;
// 
// }


// Path: cas-core/src/test/java/com/ghjansen/cas/core/physics/CellTest.java
import org.junit.Assert;
import org.junit.Test;
import com.ghjansen.cas.core.ca.Combination;
import com.ghjansen.cas.core.ca.DimensionalCombination;
import com.ghjansen.cas.core.ca.DimensionalState;
import com.ghjansen.cas.core.ca.DimensionalTransition;
import com.ghjansen.cas.core.ca.State;
import com.ghjansen.cas.core.ca.Transition;
import com.ghjansen.cas.core.exception.InvalidCombinationException;
import com.ghjansen.cas.core.exception.InvalidStateException;
import com.ghjansen.cas.core.exception.InvalidTransitionException;

/*
 * CAS - Cellular Automata Simulator
 * Copyright (C) 2016  Guilherme Humberto Jansen
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.ghjansen.cas.core.physics;



/**
 * @author Guilherme Humberto Jansen (contact.ghjansen@gmail.com)
 */
public class CellTest {

	@Test
	public void dimensionalCellConstructor()
			throws InvalidStateException, InvalidCombinationException, InvalidTransitionException {
		final DimensionalState dimensionalBlackState = new DimensionalState("black", 0);
		final DimensionalState dimensionalWhiteState = new DimensionalState("white", 1);