public void TestItRegisterAnOnPlayerProfileHandlerCorrectly() { subject.RegisterOnPlayerProfile(delegate(PlayerProfile profile) { return(Arg.Any <List <GameRecord> > ()); }); serverMock.Received().RegisterHandler( Arg.Any <short>(), Arg.Any <NetworkMessageDelegate>() ); }
// Use this for initialization void Start() { NetworkServerContainer server = new NetworkServerContainer(); MessageFactory factory = new MessageFactory(); server.Listen(Port); GameHistoryService gameHistory = new GameHistoryService( new GameRecordStore() ); GameHistoryServerMessenger gameHistoryServerMessenger = new GameHistoryServerMessenger( server, factory ); gameHistoryServerMessenger.RegisterOnGameRecord(gameHistory.RegisterGame); gameHistoryServerMessenger.RegisterOnPlayerProfile(gameHistory.ForPlayer); gameHistoryServerMessenger.RegisterOnAllGames(gameHistory.All); }