public void ShortTextContentWithBullets() { string description = new ContentMapper(50, 2000).MapBody(_jobAdId, new[] { "bullet 1", "bullet 2" }, "Hello DEEWR!"); const string expected = "<ul><li>bullet 1. </li><li>bullet 2. </li></ul>Hello DEEWR!<br/><br/><b><a href=\"{0}\">Please click here to apply.</a></b>"; Assert.AreEqual(string.Format(expected, _applyUrl), description); }
public void ShortHtmlContentWithNbsp() { string description = new ContentMapper(50, 2000).MapBody(_jobAdId, null, "Hello DEEWR!"); const string expected = "Hello DEEWR!<br/><br/><b><a href=\"{0}\">Please click here to apply.</a></b>"; Assert.AreEqual(string.Format(expected, _applyUrl), description); }
public void ShortHtmlContent() { string description = new ContentMapper(50, 2000).MapBody(_jobAdId, null, "<p>Para 1</p><p>Para 2</p>"); const string expected = "Para 1<br/><br/>Para 2<br/><br/><b><a href=\"{0}\">Please click here to apply.</a></b>"; Assert.AreEqual(string.Format(expected, _applyUrl), description); }
public void ShortTitle() { string actual = new ContentMapper(50, 2000).MapTitle("CEO"); const string expected = "CEO"; Assert.AreEqual(expected, actual); }
public void Can_Map_Published_Property() { var column = new ContentMapper(TestHelper.GetMockSqlContext(), TestHelper.CreateMaps()).Map(nameof(Content.Published)); Assert.That(column, Is.EqualTo($"[{Constants.DatabaseSchema.Tables.Document}].[published]")); }
public void Can_Map_Version_Property() { var column = new ContentMapper(TestHelper.GetMockSqlContext(), TestHelper.CreateMaps()).Map(nameof(Content.VersionId)); Assert.That(column, Is.EqualTo($"[{Constants.DatabaseSchema.Tables.ContentVersion}].[id]")); }
public void LongTitle() { const string title = "Quality Assurance Analyst | Accountants Practice Software"; const string expected = "Quality Assurance Analyst | Accountants..."; string actual = new ContentMapper(50, 2000).MapTitle(title); Assert.AreEqual(expected, actual); }
public void TruncatedSimpleRealHtmlContent() { const string content = "<html><body><ul><li>Established Company</li><li>Permanent position</li><li>Cutting-edge technology</li></ul><p>My client a leader in providing application services to specific vertical markets are seeking an experienced Developer/ Analyst Programmer who is able to provide skills and experience within the C++ Socket Programming space. You will be able to to provide development skills with the networking of applications which include low-level (deep) architecture in socket programming. UNIX Platforms & Web Servers.</p><p><strong>Requirements:</strong></p><p>To be considered for this highly sort after position, you will require the following requirements: </p><ul><li>5 + years experience in pure C# / C++ development </li><li>Current or recent experience of working within a demanding and complex development project. </li><li>Outstanding communication skills to work closely with the Business </li><li>Experience with development/ application encryption/ security</li><li>Socket-Programming</li><li>Experience with MDX (although not essential)</li><li>.Net Experience highly desirable</li><li>C++ and socket programming, Encryption technologies, C# .NET and remoting, web service programming such as SOAP</li></ul><p>This role is based in Sydney and wuld suit those with excellent skills in Socket programming & encryption skills.</p><p>If this sounds like you, then please "APPLY NOW" or alternatively call Ray Chau on 02 8234 3514 to discuss the opportunity in greater detail.</p><p> </p></html></body>"; string description = new ContentMapper(50, 250).MapBody(_jobAdId, new[] { "bullet 1", "bullet 2" }, content); const string expected = "<ul><li>bullet 1. </li><li>bullet 2. </li></ul>Established Company<br/><br/>Permanent position<br/><br/>Cutting-edge...<br/><br/><b><a href=\"{0}\">Please click here to apply.</a></b>"; Assert.AreEqual(string.Format(expected, _applyUrl), description); }
public void TruncatedComplexRealHtmlContent() { const string content = "<P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">A Casual and Full Time opportunity now exist for customer service driven contact center operators, based in our state of the art Monitoring Centre servicing residential and commercial customer alarms. <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\"> <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">Family owned and operated, SNP Security is Australia's largest integrated security solutions provider and strive to be an industry ?Employer of Choice?. Our values are fundamental to SNP Security's success, they are the foundation of our company, define who we are and set us apart from the competition. Five core values resonate at SNP Security: <B>Customer Focus</B>, <B>Teamwork</B>, <B>Leadership</B>, <B>Growth</B> and <B>Development</B>, and <B>Family Company Values</B>. <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\"> <o:p></o:p></SPAN></P> <P class=MsoBodyText style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US><FONT face=Calibri size=3>You will work along side an experienced team of operators and customer service staff servicing our key residential and commercial customers across Australia. </FONT></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">Working in our state of the art office, you will use your exceptional customer service skills to respond in line with account requirements to alarms activations. <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\"> <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">To be considered, you must posses: <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">?<SPAN style=\"mso-tab-count: 1\"> </SPAN>Exceptional customer service skills<o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">?<SPAN style=\"mso-tab-count: 1\"> </SPAN>Excellent written & verbal communication skills<o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">?<SPAN style=\"mso-tab-count: 1\"> </SPAN>Ability to solve problems and negotiate difficult customer interactions<o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">?<SPAN style=\"mso-tab-count: 1\"> </SPAN>Strong attention to detail<o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">?<SPAN style=\"mso-tab-count: 1\"> Provisional </SPAN>Class 1A Security Licence - minimum requirement<BR></SPAN><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\"> <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">As an online role, a level of computer savviness will be required ? experience using MAS would be highly regarded but is not essential.<o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\"> <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">SNP employees have access to discounts at hundreds of stores, ongoing training and development and more.<o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\"> <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">Interested applicants can apply by visiting the SNP website at jobs.snpsecurity.com.au and applying for Vacancy 95: Monitoring Operator. Be sure to attach a resume with cover letter specifying what type of security licence you hold and what skills you possess that make you suitable for our vacancy. <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\"> <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">Applications close Friday 5<SUP>th</SUP> March 2010.<o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\"> <o:p></o:p></SPAN></P> <P class=MsoNormal style=\"MARGIN: 0cm 0cm 0pt\"><SPAN lang=EN-US style=\"FONT-SIZE: 11pt; FONT-FAMILY: Calibri; mso-bidi-font-size: 12.0pt\">M/L 400674602<o:p></o:p></SPAN></P>"; string description = new ContentMapper(50, 2000).MapBody(_jobAdId, new[] { "bullet 1", "bullet 2" }, content); const string expected = "<ul><li>bullet 1. </li><li>bullet 2. </li></ul>A Casual and Full Time opportunity now exist for customer service driven contact center operators, based in our state of the art Monitoring Centre servicing residential and commercial customer alarms.<br/><br/> <br/><br/>Family owned and operated, SNP Security is Australia's largest integrated security solutions provider and strive to be an industry ?Employer of Choice?. Our values are fundamental to SNP Security's success, they are the foundation of our company, define who we are and set us apart from the competition. Five core values resonate at SNP Security: Customer Focus , Teamwork , Leadership , Growth and Development , and Family Company Values .<br/><br/> <br/><br/>You will work along side an experienced team of operators and customer service staff servicing our key residential and commercial customers across Australia.<br/><br/>Working in our state of the art office, you will use your exceptional customer service skills to respond in line with account requirements to alarms activations.<br/><br/> <br/><br/>To be considered, you must posses:<br/><br/>?                Exceptional customer service skills<br/><br/>?                Excellent written & verbal communication skills<br/><br/>?               Ability to solve problems and negotiate difficult customer interactions<br/><br/>?               Strong attention to detail<br/><br/>?               Provisional Class 1A Security Licence - minimum requirement...<br/><br/><b><a href=\"{0}\">Please click here to apply.</a></b>"; Assert.AreEqual(string.Format(expected, _applyUrl), description); }
public ContentController() { this._contentRepository = new ContentRepository(); this._contentTypeRepository = new ContentTypeRepository(); this._contentMapper = new ContentMapper(); this._contentTypeMapper = new ContentTypeMapper(); ViewData["ContentTypes"] = _contentTypeMapper.ToList(_contentTypeRepository.GetList()); }
public ModelToSqlExpressionHelperBenchmarks() { var contentMapper = new ContentMapper(MockSqlContext(), CreateMaps()); _cachedExpression = new CachedExpression(); var mapperCollection = new Mock <IMapperCollection>(); mapperCollection.Setup(x => x[It.IsAny <Type>()]).Returns(contentMapper); _mapperCollection = mapperCollection.Object; }
public void Can_Map_Trashed_Property() { // Arrange SqlSyntaxContext.SqlSyntaxProvider = SqlCeSyntax.Provider; // Act string column = new ContentMapper().Map("Trashed"); // Assert Assert.That(column, Is.EqualTo("[umbracoNode].[trashed]")); }
public void Can_Map_Published_Property() { // Arrange SqlSyntaxContext.SqlSyntaxProvider = SqlCeSyntax.Provider; // Act string column = new ContentMapper().Map("Published"); // Assert Assert.That(column, Is.EqualTo("[cmsDocument].[published]")); }
public void Can_Map_Version_Property() { // Arrange SqlSyntaxContext.SqlSyntaxProvider = SqlCeSyntax.Provider; // Act string column = new ContentMapper().Map("Version"); // Assert Assert.That(column, Is.EqualTo("[cmsContentVersion].[VersionId]")); }
public ModelToSqlExpressionHelperBenchmarks() { var contentMapper = new ContentMapper(_syntaxProvider); contentMapper.BuildMap(); _cachedExpression = new CachedExpression(); var mappingResolver = new Mock <MappingResolver>(); mappingResolver.Setup(resolver => resolver.ResolveMapperByType(It.IsAny <Type>())).Returns(contentMapper); _mappingResolver = mappingResolver.Object; }
/// <summary> /// Initializes a new instance of the <see cref="ResponseEncoder"/> class. /// </summary> /// <param name="mapper">Used to find content id for the send objects.</param> /// <param name="encoder">Serializes the sent object.</param> public ResponseEncoder(ContentMapper mapper, IContentEncoder encoder) { if (mapper == null) { throw new ArgumentNullException("mapper"); } if (encoder == null) { throw new ArgumentNullException("encoder"); } _mapper = mapper; _encoder = encoder; }
/// <summary> /// Initializes a new instance of the <see cref="ContentDecoder"/> class. /// </summary> /// <param name="mapper">Used to determine which packets to deserialize.</param> /// <param name="bufferPool">Used to store packet bytes before deserialization.</param> /// <param name="decoder">Used to deserialize the backet bytes..</param> public ContentDecoder(ContentMapper mapper, BufferPool bufferPool, IContentDecoder decoder) { if (mapper == null) { throw new ArgumentNullException("mapper"); } if (bufferPool == null) { throw new ArgumentNullException("bufferPool"); } if (decoder == null) { throw new ArgumentNullException("decoder"); } _mapper = mapper; _bufferPool = bufferPool; _decoder = decoder; }
public HttpRequestMessage MapRequest(IRestRequest request) { var url = RouteRenderer.Render(request.Route, request.RouteSegments, request.Queries, request.CultureInfo); var requestMessage = new HttpRequestMessage(request.Method.ToHttp(), url); if (request.Content != null) { requestMessage.Content = ContentMapper.MapContent(request.Content); } foreach (var header in request.Headers) { var headerValue = RestSerializer.SerializeQueryValue(header.Content, request.CultureInfo); requestMessage.Headers.Add(header.Name, headerValue); } return(requestMessage); }
public void Can_Map_Published_Property() { var column = new ContentMapper().Map(new SqlCeSyntaxProvider(), nameof(Content.Published)); Assert.That(column, Is.EqualTo($"[{Constants.DatabaseSchema.Tables.Document}].[published]")); }
public void Can_Map_Version_Property() { var column = new ContentMapper().Map(new SqlCeSyntaxProvider(), nameof(Content.VersionId)); Assert.That(column, Is.EqualTo($"[{Constants.DatabaseSchema.Tables.ContentVersion}].[id]")); }
public void Can_Map_Trashed_Property() { var column = new ContentMapper(MockSqlContext(), CreateMaps()).Map(nameof(Content.Trashed)); Assert.That(column, Is.EqualTo($"[{Constants.DatabaseSchema.Tables.Node}].[trashed]")); }