001/**
002 * Copyright (c) 2008-2014 Ardor Labs, Inc.
003 *
004 * This file is part of Ardor3D.
005 *
006 * Ardor3D is free software: you can redistribute it and/or modify it 
007 * under the terms of its license which may be found in the accompanying
008 * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
009 */
010
011package com.ardor3d.math;
012
013import static org.junit.Assert.*;
014
015import org.junit.Test;
016
017public class TestMathExceptions {
018    @Test
019    public void testInvalidTransformException() {
020        final InvalidTransformException ex1 = new InvalidTransformException();
021        final InvalidTransformException ex2 = new InvalidTransformException("ABC");
022        final Exception a = new Exception();
023        final InvalidTransformException ex3 = new InvalidTransformException(a);
024        final InvalidTransformException ex4 = new InvalidTransformException("DEF", a);
025
026        assertNotNull(ex1);
027        assertEquals("ABC", ex2.getMessage());
028        assertEquals(a, ex3.getCause());
029        assertEquals("DEF", ex4.getMessage());
030        assertEquals(a, ex4.getCause());
031    }
032
033    @Test
034    public void testTransformException() {
035        final TransformException ex1 = new TransformException();
036        final TransformException ex2 = new TransformException("ABC");
037
038        assertNotNull(ex1);
039        assertEquals("ABC", ex2.getMessage());
040    }
041}