示例#1
0
            public void SimpleInterpolation()
            {
                // Given
                TestDocument         document = new TestDocument();
                TestExecutionContext context  = new TestExecutionContext();

                // When
                string result = document.Interpolate("ABC {1+2} XYZ", context);

                // Then
                result.ShouldBe("ABC 3 XYZ");
            }
示例#2
0
            public void DocumentMetadataIsAvailable()
            {
                // Given
                TestDocument document = new TestDocument()
                {
                    { "Foo", 5 }
                };
                TestExecutionContext context = new TestExecutionContext();

                // When
                string result = document.Interpolate("ABC {Foo} XYZ", context);

                // Then
                result.ShouldBe("ABC 5 XYZ");
            }