public void InsertEntityParameters_Null() { const string template = "{user:username}"; var dialog = _fixture.Build <Dialog>() .With(x => x.Client, new User { Username = null }) .Create(); var result = TextTemplateHandler.InsertEntityParameters(template, dialog, null).Result; Assert.AreEqual("null", result); }
public void InsertEntityParameters_Simple() { var template = "{user:username}"; var username = _fixture.Create <string>(); var dialog = _fixture.Build <Dialog>() .With(x => x.Client, new User { Username = username }) .Create(); var result = TextTemplateHandler.InsertEntityParameters(template, dialog, null).Result; Assert.AreEqual(username, result); }
public Task <string> InsertEntityParameters(string message, Dialog dialog, IPlatformDatabase database) { return(TextTemplateHandler.InsertEntityParameters(message, dialog, database)); }