private void SendMashupMessage() { var pluginMessage = new PluginMashupMessage { PluginMashupScripts = GetMashupScripts().ToArray(), PluginName = "Search", Placeholders = new[] { "tp2placeholder" }, MashupName = "SearchTP2Enabler" }; _bus.Send(pluginMessage); }
public void CheckCreatedInTpMashup(string mashupName, string accounts, string placeholders, string script) { PluginMashupMessage mashup = GetMashupMessageByName(mashupName); mashup.MashupName.Should(Be.EqualTo(mashupName)); mashup.PluginMashupScripts.Select(s => s.ScriptContent).ToArray().Should(Be.EquivalentTo(new[] { script, string.Format("{0}{1}", MashupConfig.AccountsConfigPrefix, accounts) })); mashup.Placeholders.Select(p => p.ToLower()).Should(Be.EquivalentTo(placeholders.Split(',').Select(p => p.Trim().ToLower()))); var scriptNames = mashup.PluginMashupScripts.Select(s => s.FileName).ToArray(); scriptNames.Count().Should(Be.EqualTo(2)); scriptNames.Should(Contains.Item(Mashup.AccountCfgFileName)); scriptNames.Count(n => n.EndsWith("js")).Should(Be.EqualTo(1)); }