Ejemplo n.º 1
0
 public void ReplacesDateTimeFieldValue()
 {
     using (var db = GetFakeDb())
     {
         var processor = new ReplaceItemTokens();
         var args      = new ReplaceFieldValueTokensArgs("{ItemField:ADateField:yyyy-MM-dd}", db.GetItem("/sitecore/content/page"));
         processor.Process(args);
         args.FieldValue.Should().Be(@"2015-03-03");
     }
 }
Ejemplo n.º 2
0
 public void RetrievesUpdatedByValue()
 {
     using (var db = GetFakeDb())
     {
         var processor = new ReplaceItemTokens();
         var args      = new ReplaceFieldValueTokensArgs("{UpdatedBy}", db.GetItem("/sitecore/content/page"));
         processor.Process(args);
         args.FieldValue.Should().Be(@"sitecore\updater");
     }
 }
Ejemplo n.º 3
0
 public void ReplacesStringFieldValue()
 {
     using (var db = GetFakeDb())
     {
         var processor = new ReplaceItemTokens();
         var args      = new ReplaceFieldValueTokensArgs("{ItemField:ATextField}", db.GetItem("/sitecore/content/page"));
         processor.Process(args);
         args.FieldValue.Should().Be(@"A text value");
     }
 }