public void AddChannelInEventExecutor() { AMSEventSqlAdapter.Instance.ClearAll(); AMSChannelSqlAdapter.Instance.ClearAll(); AMSChannel channel = DataHelper.PrepareChannelData(); AMSChannelSqlAdapter.Instance.Update(channel); AMSEvent eventData = DataHelper.PrepareEventData(channel.ID); AMSEventSqlAdapter.Instance.Update(eventData); AMSChannel newChannel = DataHelper.PrepareChannelData(); AMSChannelSqlAdapter.Instance.Update(newChannel); AMSAddChannelInEventExecutor executor = new AMSAddChannelInEventExecutor(eventData.ID, newChannel.ID); executor.Execute(); AMSChannelCollection channels = AMSEventSqlAdapter.Instance.LoadRelativeChannels(eventData.ID); channels.Output(); Assert.AreEqual(2, channels.Count); }
protected void postAddChannelBtn_Click(object sender, EventArgs e) { string channelID = this.unusedChannels.SelectedValue; if (channelID.IsNotEmpty()) { AMSAddChannelInEventExecutor executor = new AMSAddChannelInEventExecutor(this.EventID, channelID); executor.Execute(); this.RefreshChannelsAndList(); } }