public void GetUserByObjectIdTest() { var mockServiceClient = new MockServiceClient(_goodMessageHandler); var b2CGraphService = new B2CGraphService(mockServiceClient); var expected = JsonConvert.SerializeObject(TestObj); var response = b2CGraphService.GetUserByObjectId("").Result; Assert.Equal(expected, response); }
public BigBazarService() { IServiceClient serviceClient = new ServiceClient(); IB2CGraphService b2CGraphService = new B2CGraphService(serviceClient); IGraphService graphService = new GraphService(); #if DEBUG IServiceId serviceId = new ServiceId.ServiceId(graphService, b2CGraphService, serviceClient); // IServiceId serviceId = new ServiceId.MockServiceId(graphService, b2CGraphService, serviceClient); #else IServiceId serviceId = new ServiceId.ServiceId(graphService, b2CGraphService, serviceClient); #endif _services = new List <object>() { // new TollTag(serviceId,serviceClient), // new AccountDetails(serviceId, serviceClient), }; }
/// <summary> /// Constructor used to initialize services to be used /// </summary> public EzPassService() { IServiceClient serviceClient = new ServiceClient(); IB2CGraphService b2CGraphService = new B2CGraphService(serviceClient); IGraphService graphService = new GraphService(); #if DEBUG IServiceId serviceId = new ServiceId.ServiceId(graphService, b2CGraphService, serviceClient); // IServiceId serviceId = new ServiceId.MockServiceId(graphService, b2CGraphService, serviceClient); #else IServiceId serviceId = new ServiceId.ServiceId(graphService, b2CGraphService, serviceClient); #endif _services = new List <object>() { new TollTag(serviceId, serviceClient), new AccountDetails(serviceId, serviceClient), new Payment(serviceId, serviceClient), new Vehicle(serviceId, serviceClient) }; }