public void ActionDrillthroughTest1() { int id = 0; string reportName = "report"; IDrillthrough drillthrough = Drillthrough.Create(reportName, null); Action action = Action.CreateDrillthrouth(drillthrough, id); Assert.AreEqual(ActionType.DrillThrough, action.ActionType); Assert.IsNotNull(action.Drillthrough); Assert.AreEqual(reportName, action.Drillthrough.ReportName); Assert.AreEqual(id, action.ActionId); Assert.AreEqual(0, action.Drillthrough.NumberOfParameters); }
public void DrillthroughTest() { string reportName = "reportName"; IList parameters = new DrillthroughParameter[] { }; IDrillthrough drillthrough = Components.Calendar.Drillthrough.Create(reportName, parameters); Assert.AreEqual(reportName, drillthrough.ReportName); Assert.AreEqual(parameters.Count, drillthrough.NumberOfParameters); IList parameters1 = new DrillthroughParameter[] { }; IDrillthrough drillthrough1 = Components.Calendar.Drillthrough.Create(reportName, parameters); Assert.AreEqual(reportName, drillthrough1.ReportName); Assert.AreEqual(parameters1.Count, drillthrough1.NumberOfParameters); }
public void ActionDrillthroughTest2() { const int id = 0; const string reportName = "report"; DrillthroughParameter[] parameters = new[] { new DrillthroughParameter("a", 1, false), new DrillthroughParameter("b", 2, false), }; IDrillthrough drillthrough = Drillthrough.Create(reportName, parameters); Action action = Action.CreateDrillthrouth(drillthrough, id); Assert.AreEqual(ActionType.DrillThrough, action.ActionType); Assert.IsNotNull(action.Drillthrough); Assert.AreEqual(reportName, action.Drillthrough.ReportName); Assert.AreEqual(id, action.ActionId); Assert.AreEqual(parameters.Length, action.Drillthrough.NumberOfParameters); }
/// <summary> /// Creates Drillthrough action /// </summary> /// <param name="drillthrough"></param> /// <param name="actionId"></param> /// <returns></returns> public static Action CreateDrillthrouth(IDrillthrough drillthrough, int actionId) { return(new Action(drillthrough, actionId)); }
private Action(IDrillthrough drillthrough, int actionId) { _drillthrough = drillthrough; _actionType = ActionType.DrillThrough; _actionId = actionId; }