Esempio n. 1
0
    public Db(string databaseName)
    {
      this.database = Database.GetDatabase(databaseName);
      this.dataStorage = new DataStorage(this.database);

      var config = Factory.GetConfiguration();
      this.configuration = new DbConfiguration(config);
      this.pipelineWatcher = new PipelineWatcher(config);

      var args = new InitDbArgs(this.database, this.dataStorage);
      CorePipeline.Run("initFakeDb", args);
    }
    public void ShouldRegisterPipelineExpectedToBeCalled()
    {
      // arrange
      var config = CreateSimpleConfig();
      using (var w = new PipelineWatcher(config))
      {
        // act
        w.Expects("mypipeline");

        // assert
        config.SelectSingleNode("/sitecore/pipelines/mypipeline").Should().NotBeNull();
      }
    }
Esempio n. 3
0
 internal Db(PipelineWatcher pipelineWatcher)
   : this()
 {
   this.pipelineWatcher = pipelineWatcher;
 }
 public PipelineWatcherTest()
 {
   this.watcher = new PipelineWatcher(Factory.GetConfiguration());
 }