test_move = proc()
    % tests the move_t cluster
    
    % create
    %
    % Black Box
    % 
    % Creates a few objects of type move.
    % The use of the results will show that create works.
    place_1 : place_t := place_t$create(4,5)
    place_2 : place_t := place_t$create(1,5)
    place_3 : place_t := place_t$create(4,5)
    
    move_1_2 : move_t := move_t$create(place_1,place_2)
    move_1_3 : move_t := move_t$create(place_1,place_3)
    move_2_3 : move_t := move_t$create(place_2,place_3)	

    % Glass box
    %
    % No further tests should be nessesary

    % parse
    %
    % Black Box
    %
    % test move string in valid format
    % test move with uppercase letters
    % test a bad string
    assert("parse e4-e1",move_1_2 = move_t$parse("e4-e1"))
    
    assert("parse E4-E1",move_1_2 = move_t$parse("E4-E1"))
    
    ok_flag : bool := false
    move_t$parse("hdfjkhsajkghk")
     except when invalid:
	ok_flag := true
	end
    assert("parse: Invalid string",ok_flag)
    
    % Glass Box
    %
    % test when 3rd character is not a '-'
    % test when not 5 char long
    % test when place string is invalid
    
    ok_flag := false
    move_t$parse("a2 a5")
     except when invalid:
	ok_flag := true
	end
    assert("parse: Invalid string a2 a5",ok_flag)
    
    ok_flag := false
    move_t$parse("a2-a5g")
     except when invalid:
	ok_flag := true
	end
    assert("parse: Invalid string a2-a5g",ok_flag)
    
    ok_flag := false
    move_t$parse("2a-e4")
     except when invalid:
	ok_flag := true
	end
    assert("parse: Invalid string 2a-e4",ok_flag)
    
    % unparse
    %
    % Black Box
    %
    % Test by unparseing a move and compairing it to its string 
    % representation.
    assert("unparse","e4-e1" = move_t$unparse(move_1_2))
        
    % Glass box
    %
    % No further tests should be nessesary
    
    % get_from
    %
    % Black Box
    % 
    % get from place of a move and compair to the place it should be
    assert("get_from",move_1_3.from = place_1)
    
    % Glass box
    %
    % No further tests should be nessesary
    
    % get_to
    %
    % Black Box
    %
    % get to place of a move and compair to the place it should be

    assert("get_from",move_1_3.to = place_3)
	
    % Glass box
    %
    % No further tests should be nessesary

    % equal
    %
    % Black Box
    % 
    % test with two disinct place object that represent the same place
    m_2_3 : move_t := move_t$create(place_2,place_3)
    assert("equal",m_2_3 = move_2_3)
    
    % Glass box
    %
    % test when from is same but to different
    % test when to is same but from different
    % test when both different
        
    assert("equal: diff to",(move_1_2 = move_1_3) = false)
	    
    assert("equal: diff from",(move_1_3 = move_2_3) = false)
	        
    assert("equal: diff from and to",(move_1_2 = move_2_3) = false)
    
    end test_move





