// baseballMasterTest.cc   P. Conrad for CISC220, 06J
// Class for Lahman Baseball Database (www.baseball1.com), version 5.3

// See license and copyright statement at bottom of file


#include <iostream>
using std::cout;
using std::cerr;
using std::endl;

#include "runTests.h"

#include "baseballMaster.h"

int main(void)
{

  RunTests_C test;

  char inputLine1[] = "1,aaronha01,,aaronha01h,1934,2,5,USA,AL,Mobile,,,,,,,Hank,Aaron,,Henry Louis,\"Hammer,Hammerin' Hank,Bad Henry\",180,72,R,R,4/13/1954,10/3/1976,,aaronha01,aaronha01,aaroh101,aaronha01,aaronha01";
    
  BaseballMaster_C player1(inputLine1);

  test.assertEquals(player1.getLahmanID(),1);

  test.assertEquals(player1.getPlayerID(),"aaronha01");
  test.assertEquals(player1.getManagerID(),"");
  test.assertEquals(player1.getHofID(),"aaronha01h");

  test.assertEquals(player1.getBirth()->getDate().getYear(),1934);
  test.assertEquals(player1.getBirth()->getDate().getMonth(),2);
  test.assertEquals(player1.getBirth()->getDate().getDay(),5);
  test.assertEquals(player1.getBirth()->getCountry(),"USA");
  test.assertEquals(player1.getBirth()->getState(),"AL");
  test.assertEquals(player1.getBirth()->getCity(),"Mobile");

  test.assertEquals((int) player1.getDeath(),0);
  test.assertEquals(player1.getNameFirst(),"Hank");
  test.assertEquals(player1.getNameLast(),"Aaron");
  test.assertEquals(player1.getNameNote(),"");
  test.assertEquals(player1.getNameGiven(),"Henry Louis");
  test.assertEquals(player1.getNameNick(),"Hammer,Hammerin' Hank,Bad Henry");


  test.print(cerr);
  test.finish();
}



// COPYRIGHT NOTICE:

// This code corresponds to the data layout of the Lahmann Database,
// which is copyrighted by Sean Lahmann.  The data and formats here
// are used by special permission of Sean Lahmann, granted to Phill 
// Conrad for use in Computer Science courses at the University of 
// Delaware.  You must obtain permission from Sean Lahmann to use this
// data and/or data format for any other purpose.  For more details,
// visit www.baseball1.com

