public void Setup() { var memoryStoreClient = new Mock <IMemoryStoreClient>(); var authClient = new Mock <PlayerAuthServiceClient>(); var memoryStoreClientManager = new Mock <IMemoryStoreClientManager <IMemoryStoreClient> >(); memoryStoreClientManager.Setup(manager => manager.GetClient()).Returns(memoryStoreClient.Object); _service = new OperationsServiceImpl(memoryStoreClientManager.Object, authClient.Object); }
public void Setup() { _memoryStoreClient = new Mock <IMemoryStoreClient>(MockBehavior.Strict); _transaction = new Mock <ITransaction>(MockBehavior.Strict); _transaction.Setup(tx => tx.Dispose()); _authClient = new Mock <PlayerAuthServiceClient>(MockBehavior.Strict); var memoryStoreClientManager = new Mock <IMemoryStoreClientManager <IMemoryStoreClient> >(); memoryStoreClientManager.Setup(manager => manager.GetClient()).Returns(_memoryStoreClient.Object); _memoryStoreClient.Setup(client => client.CreateTransaction()).Returns(_transaction.Object); _memoryStoreClient.Setup(client => client.Dispose()); _service = new OperationsServiceImpl(memoryStoreClientManager.Object, _authClient.Object); }
public void Setup() { _party = new Party(LeaderId, Pit); _party.AddPlayerToParty(PlayerId, Pit); _transaction = new Mock <ITransaction>(MockBehavior.Strict); _transaction.Setup(tx => tx.Dispose()); _memoryStoreClient = new Mock <IMemoryStoreClient>(MockBehavior.Strict); _memoryStoreClient.Setup(client => client.CreateTransaction()).Returns(_transaction.Object); _memoryStoreClient.Setup(client => client.Dispose()); var memoryStoreClientManager = new Mock <IMemoryStoreClientManager <IMemoryStoreClient> >(); memoryStoreClientManager.Setup(manager => manager.GetClient()).Returns(_memoryStoreClient.Object); _service = new OperationsServiceImpl(memoryStoreClientManager.Object, null); }