public void SetUp() { // Leave this here! Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); LocalizationManager.Stub(); theGrammar = new EnterGrammarFixture()["EnterDirection"] as LineGrammar; }
protected SingleLineGrammar() { var types = new List<Type> { typeof (object), typeof (SingleLineGrammar) }; foreach (MethodInfo method in GetType().GetMethods()) { if (types.Contains(method.DeclaringType)) { continue; } _inner = GrammarBuilder.BuildGrammar(method, this).As<LineGrammar>(); break; } if (_inner == null) { throw new ApplicationException("There is no suitable public method for this Grammar"); } }
protected SingleLineGrammar() { var types = new List <Type> { typeof(object), typeof(SingleLineGrammar) }; foreach (MethodInfo method in GetType().GetMethods()) { if (types.Contains(method.DeclaringType)) { continue; } _inner = GrammarBuilder.BuildGrammar(method, this).As <LineGrammar>(); break; } if (_inner == null) { throw new ApplicationException("There is no suitable public method for this Grammar"); } }
public void SetUp() { step = new Step(); step.LeafFor("record") .WithStep("a:1,b:2") .WithStep("a:3,b:4") .WithStep("a:5,b:6"); inner = MockRepository.GenerateMock<LineGrammar>(); grammar = new TableGrammar(inner, "record"); grammar.LabelName = "some label"; }