public void uses_the_specific_analysis_type_when_one_set_in_ctor(AnalyticType type) { var seq = new MeasuredKeySequence(type); seq.Start(string.Empty); seq.Stop(string.Empty); Assert.That(seq.Analysis, Has.One.Matches <IAnalytic>(d => d.GetAnalyticType() == type)); }
public static IAnalytic Create(AnalyticType type, AnalyticData data) { if (type == AnalyticType.Speed) { return(new Speed(data)); } else if (type == AnalyticType.Accuracy) { return(new Accuracy(data)); } throw new NotImplementedException(); }
void BindModel(Model model, AnalyticType type) { if (type == AnalyticType.RULE) { groupModules.Visibility = System.Windows.Visibility.Collapsed; } if (type == AnalyticType.MODULE) { groupRules.Visibility = System.Windows.Visibility.Collapsed; } //TODO: Stub fix for #225 Remove this with plugin functionality last = activityContext.container.Resolve <ILastChangedModule>(); if (last.module != null) { //CompleteWith(() => Success(new Result.ConfigureModule(last.module))); Success(new Result.ConfigureModule(last.module)); } // modulesList.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(modulesList_MouseDoubleClick); rulesList.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(rulesList_MouseDoubleClick); }
public void factory_returns_correct_IAnalytic_by_type(AnalyticType type, Type result) { IAnalytic analytic = BaseAnalytic.Create(type, null); Assert.That(analytic, Is.TypeOf(result)); }
public MeasuredKeySequence(AnalyticType analytic) : this(new List <AnalyticType>() { analytic }) { }