Ejemplo n.º 1
0
        public ContentContentType Get(string mimeContentType)
        {
            string[] strings = mimeContentType.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);

            Content     content     = _contentsRepository.GetByName(strings[0]);
            ContentType contentType = _contentTypesRepository.GetByName(strings[1]);

            ContentContentType result = _contentContentTypesRepository.Get(content.Id, contentType.Id);

            return(result);
        }
Ejemplo n.º 2
0
        public void Get_ShouldReturnEntity()
        {
            //Arrange
            ResetDataBase();
            ContentContentTypesBL contentContentTypesBL = DI.Resolve <ContentContentTypesBL>();

            //Act
            ContentContentType contentContentType = contentContentTypesBL.Get("image/png");

            //Assert
            Assert.That(contentContentType, !Is.Null);
        }