Exemple #1
0
 private LiquidCollection CreateObjList()
 {
     return(new LiquidCollection
     {
         DataFixtures.CreateDictionary(1, "Aa", "Value 1 B"),
         DataFixtures.CreateDictionary(2, "Z", "Value 2 B"),
         DataFixtures.CreateDictionary(3, "ab", "Value 3 B"),
         DataFixtures.CreateDictionary(4, "b", "Value 4 B"),
     });
 }
Exemple #2
0
 public LiquidCollection CreateArray()
 {
     // Arrange
     return(new LiquidCollection {
         DataFixtures.CreateDictionary(1, "Value 1 A", "Value 1 B"),
         DataFixtures.CreateDictionary(2, "Value 2 A", "Value 2 B"),
         DataFixtures.CreateDictionary(3, "Value 3 A", "Value 3 B"),
         DataFixtures.CreateDictionary(4, "Value 4 A", "Value 4 B"),
     });
 }
Exemple #3
0
        public void It_Should_Do_The_Same_As_Lookup_When_Dictionary()
        {
            // Arrange
            var dict      = DataFixtures.CreateDictionary(1, "Value 1 A", "Value 1 B");
            var field     = "field1";
            var mapFilter = new MapFilter(LiquidString.Create(field));

            // Act
            var result = mapFilter.Apply(new TemplateContext(), dict).SuccessValue <LiquidString>();

            // Assert
            Assert.That(result, Is.EquivalentTo("Value 1 A"));
        }