Exemplo n.º 1
0
 public GarmentLocalSalesOmzetService(IServiceProvider serviceProvider)
 {
     repository        = serviceProvider.GetService <IGarmentShippingLocalSalesNoteRepository>();
     itemrepository    = serviceProvider.GetService <IGarmentShippingLocalSalesNoteItemRepository>();
     lclrepository     = serviceProvider.GetService <IGarmentLocalCoverLetterRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
        public Mock <IServiceProvider> GetServiceProvider(IGarmentLocalCoverLetterRepository repository)
        {
            var spMock = new Mock <IServiceProvider>();

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

            return(spMock);
        }
        public Mock <IServiceProvider> GetServiceProvider(IGarmentShippingLocalSalesNoteRepository repository, IGarmentShippingLocalSalesNoteItemRepository itemrepository, IGarmentLocalCoverLetterRepository lclrepository)
        {
            var spMock = new Mock <IServiceProvider>();

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

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingLocalSalesNoteItemRepository)))
            .Returns(itemrepository);

            spMock.Setup(s => s.GetService(typeof(IGarmentLocalCoverLetterRepository)))
            .Returns(lclrepository);

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

            return(spMock);
        }
Exemplo n.º 4
0
 public GarmentLocalCoverLetterService(IServiceProvider serviceProvider)
 {
     _repository = serviceProvider.GetService <IGarmentLocalCoverLetterRepository>();
 }