public void Setup()
 {
     _idProvider = new IntegerIdProvider();
     _provider = MockRepository.GenerateStub<ExcelDataProvider>();
     SetupExcelProvider();
     _idProvider = new IntegerIdProvider();
     _chainContext = CalcChainContext.Create(_idProvider);
     _builder = new CalcChainContextBuilder();
     _parsingContext = ParsingContext.Create();
     _parsingContext.RangeAddressFactory = new RangeAddressFactory(_provider);
     _parsingContext.Configuration.SetIdProvider(_idProvider);
     _parsingContext.Configuration.SetLexer(new Lexer(_parsingContext.Configuration.FunctionRepository, _parsingContext.NameValueProvider));
     _parsingContext.ExcelDataProvider = _provider;
 }
Exemplo n.º 2
0
 public static CalcChain Create(IdProvider idProvider)
 {
     Require.That(idProvider).Named("idProvider").IsNotNull();
     return new CalcChain(idProvider);
 }
Exemplo n.º 3
0
 private CalcChain(IdProvider idProvider)
 {
     Id = idProvider.NewId();
 }
Exemplo n.º 4
0
 private CalcChainContext(IdProvider idProvider)
 {
     IdProvider = idProvider;
     CalcCells = CalcCellRepository.Create(this);
 }
 public ParsingConfiguration SetIdProvider(IdProvider idProvider)
 {
     IdProvider = idProvider;
     return this;
 }