Example #1
0
 public GarmentShippingInstructionMonitoringService(IServiceProvider serviceProvider)
 {
     repository        = serviceProvider.GetService <IGarmentShippingInstructionRepository>();
     invrepository     = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     clrepository      = serviceProvider.GetService <IGarmentCoverLetterRepository>();
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
Example #2
0
 public GarmentInvoiceHistoryMonitoringService(IServiceProvider serviceProvider)
 {
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     repository        = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     sirepository      = serviceProvider.GetService <IGarmentShippingInstructionRepository>();
     clrepository      = serviceProvider.GetService <IGarmentCoverLetterRepository>();
     carepository      = serviceProvider.GetService <IGarmentShippingCreditAdviceRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
        public Mock <IServiceProvider> GetServiceProvider(IGarmentShippingInstructionRepository repository)
        {
            var spMock = new Mock <IServiceProvider>();

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInstructionRepository)))
            .Returns(repository);

            return(spMock);
        }
        public Mock <IServiceProvider> GetServiceProvider(IGarmentShippingInstructionRepository repository, IGarmentShippingInvoiceRepository invrepository, IGarmentPackingListRepository plrepository, IGarmentCoverLetterRepository clrepository)

        {
            var spMock = new Mock <IServiceProvider>();

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInstructionRepository)))
            .Returns(repository);

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInvoiceRepository)))
            .Returns(invrepository);

            spMock.Setup(s => s.GetService(typeof(IGarmentPackingListRepository)))
            .Returns(plrepository);

            spMock.Setup(s => s.GetService(typeof(IGarmentCoverLetterRepository)))
            .Returns(clrepository);

            spMock.Setup(s => s.GetService(typeof(IIdentityProvider)))
            .Returns(new IdentityProvider());

            return(spMock);
        }
Example #5
0
 public GarmentShippingInstructionService(IServiceProvider serviceProvider)
 {
     _shippingInstructionRepository = serviceProvider.GetService <IGarmentShippingInstructionRepository>();
 }