dm.vpi.lekce04.matrix
Class MatrixTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by dm.vpi.lekce04.matrix.MatrixTest
All Implemented Interfaces:
junit.framework.Test

public class MatrixTest
extends junit.framework.TestCase

Testovací třída pro třídu Matrix, která využívá knihovnu JUnit. Tato knihovna poskytuje možnost vytvářet automatizované testy nad vyvíjenou aplikací. Jde o velmi užitečný a využívaný nástroj. Poskytuje totiž velkou míru jistoty, že jakákoli pozdější úprava aplikace nebude mít nepředvídané vedlejší efekty.

Tato třída musí být potomkem třídy junit.framework.TestCase. Proměnné využívané všemi testy se nastavují v metodě setUp(). Jednotlivé testy se vytváří jako metody testNěco(), kde Něco je název testu - předpona test je důležitá.

Author:
"David Martinek"

Field Summary
private  Matrix E
           
private  Matrix One5x2
           
private  Matrix One5x5
           
private  Matrix Rand5x2
           
private  Matrix Rand5x5
           
private  Matrix Zero
           
private  Matrix Zero2x0
           
private  Matrix Zero2x5
           
private  Matrix Zero5x2
           
private  Matrix Zero5x5
           
 
Constructor Summary
MatrixTest()
           
 
Method Summary
protected  void setUp()
           
 void testAddConstint()
           
 void testAddMatrix()
           
 void testClone()
           
 void testCreateEMatrix()
           
 void testCreateRandomMatrix()
           
 void testGetCols()
           
 void testGetProduct()
           
 void testGetRows()
           
 void testMatrixintint()
           
 void testMultConstint()
           
 void testMultMatrix()
           
 void testSetValueMatrix()
           
 void testSubMatrix()
           
 void testTranspose()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

E

private Matrix E

Zero

private Matrix Zero

Zero5x5

private Matrix Zero5x5

One5x5

private Matrix One5x5

Zero2x5

private Matrix Zero2x5

One5x2

private Matrix One5x2

Rand5x2

private Matrix Rand5x2

Rand5x5

private Matrix Rand5x5

Zero5x2

private Matrix Zero5x2

Zero2x0

private Matrix Zero2x0
Constructor Detail

MatrixTest

public MatrixTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

testMatrixintint

public void testMatrixintint()

testClone

public void testClone()

testCreateEMatrix

public void testCreateEMatrix()

testCreateRandomMatrix

public void testCreateRandomMatrix()

testGetRows

public void testGetRows()

testGetCols

public void testGetCols()

testSetValueMatrix

public void testSetValueMatrix()

testAddMatrix

public void testAddMatrix()

testSubMatrix

public void testSubMatrix()

testAddConstint

public void testAddConstint()

testMultConstint

public void testMultConstint()

testGetProduct

public void testGetProduct()

testMultMatrix

public void testMultMatrix()

testTranspose

public void testTranspose()