public void Setup() { _characterRelationDao = new GenericDao <CharacterRelation, CharacterRelationDto, Guid>(_logger); Broadcaster.Reset(); TestHelpers.Reset(); _session = TestHelpers.Instance.GenerateSession(); _channelHttpClient = TestHelpers.Instance.ChannelHttpClient; _connectedAccountHttpClient = TestHelpers.Instance.ConnectedAccountHttpClient; _friendHttpClient = TestHelpers.Instance.FriendHttpClient; _fDelPacketHandler = new FdelPacketHandler(_friendHttpClient.Object, _channelHttpClient.Object, _connectedAccountHttpClient.Object); _characterDao = new Mock <IGenericDao <CharacterDto> >(); _friendController = new FriendController(_logger, _characterRelationDao, _characterDao.Object, new FriendRequestHolder(), _connectedAccountHttpClient.Object); _friendHttpClient.Setup(s => s.GetListFriends(It.IsAny <long>())) .Returns((long id) => _friendController.GetFriends(id)); _friendHttpClient.Setup(s => s.DeleteFriend(It.IsAny <Guid>())) .Callback((Guid id) => _friendController.Delete(id)); }