예제 #1
0
        public void SetUp()
        {
            _allowedSites = new List<long>() { 123, 456, 789 };

            _docHandlerDocumentTypeGroup = DocHandlerDocumentTypeGroup.BusinessSafeSystem;
        
            _viewModelFactory = new Mock<IDocumentLibraryViewModelFactory>();

            _viewModelFactory
                .Setup(x => x.WithCompanyId(_companyId))
                .Returns(_viewModelFactory.Object);

            _viewModelFactory
                .Setup(x => x.WithDocumentTypeId(_documentTypeId))
                .Returns(_viewModelFactory.Object);

            _viewModelFactory
                .Setup(x => x.WithDocHandlerDocumentTypeGroup(_docHandlerDocumentTypeGroup))
                .Returns(_viewModelFactory.Object);

            _viewModelFactory
                .Setup(x => x.WithDocumentTitle(_title))
                .Returns(_viewModelFactory.Object);

            _viewModelFactory
                .Setup(x => x.WithSiteId(_siteId))
                .Returns(_viewModelFactory.Object);

            _viewModelFactory
                .Setup(x => x.WithAllowedSites(It.IsAny<List<long>>()))
                .Returns(_viewModelFactory.Object);        
        }
 public IEnumerable<DocHandlerDocumentTypeDto> GetForDocumentGroup(DocHandlerDocumentTypeGroup docHandlerDocumentTypeGroup)
 {
     var docHandlerDocumentTypes = _docHandlerDocumentTypeRepository.GetByDocHandlerDocumentTypeGroup(docHandlerDocumentTypeGroup);
     return new DocHandlerDocumentTypeDtoMapper().Map(docHandlerDocumentTypes);
 }