Beispiel #1
0
        public async Task DictionaryTemplateEngine_SimpleStringBinging()
        {
            var engine = new DictionaryRenderer(templates1);
            var result = await engine.RenderTemplate(null, "en", "stringTemplate", new { name = "joe" });

            Assert.IsInstanceOfType(result, typeof(string));
            Assert.AreEqual("en: joe", (string)result);
        }
        public async Task DictionaryTemplateEngine_SimpleStringBinding()
        {
            var engine = new DictionaryRenderer(_templateFixture.Templates1);
            var result = await engine.RenderTemplate(null, "en", "stringTemplate", new { name = "joe" });

            Assert.Equal(typeof(string), result.GetType());
            Assert.Equal("en: joe", (string)result);
        }
Beispiel #3
0
        public async Task DictionaryTemplateEngine_SimpleActivityBinding()
        {
            var engine = new DictionaryRenderer(templates1);
            var result = await engine.RenderTemplate(null, "en", "activityTemplate", new { name = "joe" });

            Assert.IsInstanceOfType(result, typeof(Activity));
            var activity = result as Activity;

            Assert.AreEqual(ActivityTypes.Message, activity.Type);
            Assert.AreEqual("(Activity)en: joe", activity.Text);
        }
        public async Task DictionaryTemplateEngine_SimpleActivityBinding()
        {
            var engine = new DictionaryRenderer(_templateFixture.Templates1);
            var result = await engine.RenderTemplate(null, "en", "activityTemplate", new { name = "joe" });

            Assert.Equal(typeof(Activity), result.GetType());

            var activity = result as Activity;

            Assert.Equal(ActivityTypes.Message, activity.Type);
            Assert.Equal("(Activity)en: joe", activity.Text);
        }