public void SetUp()
 {
   this.mediaSettings = new MediaLibrarySettings(
     "/sitecore/media library",
     "ashx",
     "~/media/");
 }
    public ISitecoreWebApiSession BuildSession()
    {
      string optionalWebApiVersion = this.OptionalWebApiVersion();
      string optionalMediaRoot = this.OptionalMediaRoot();
      string optionalMediaExtension = this.OptionalMediaExtension();
      string optionalMediaPrefix = this.OptionalMediaPrefix();


      ////////
      SessionConfig conf = new SessionConfig(
        this.instanceUrl,
        this.site,
        optionalWebApiVersion);

      var mediaSettings = new MediaLibrarySettings(
        optionalMediaRoot,
        optionalMediaExtension,
        optionalMediaPrefix,
        this.resizingFlag);

      var itemSource = new ItemSource(
        this.itemSourceAccumulator.Database,
        this.itemSourceAccumulator.Language,
        this.itemSourceAccumulator.VersionNumber);

      var result = new ScApiSession(conf, this.credentials, mediaSettings, itemSource);
      return result;
    }
 public void TearDown()
 {
   this.itemSource = null;
   this.session.Dispose();
   this.session = null;
   this.env = null;
   this.mediaSettings = null;
 }
 public void TearDown()
 {
   this.anonymousSession.Dispose();
   this.anonymousSession = null;
   this.authenticatedSession.Dispose();
   this.authenticatedSession = null;
   this.mediaSettings = null;
   this.testData = null;
 }
    public void SetUp()
    {
      this.mediaSettings = new MediaLibrarySettings(
        "/sitecore/media library",
        "ashx",
        "~/media/");

      this.testData = TestEnvironment.DefaultTestEnvironment();

      var config = new SessionConfig(testData.InstanceUrl);
      this.anonymousSession = new ScTestApiSession(config, null, this.mediaSettings, LegacyConstants.DefaultSource());

      config = new SessionConfig(testData.InstanceUrl);
      this.authenticatedSession = new ScTestApiSession(config, testData.Users.Admin, this.mediaSettings, LegacyConstants.DefaultSource());
    }
    public void Setup()
    {
      TestEnvironment env = TestEnvironment.DefaultTestEnvironment();
      this.env = env;

      this.mediaSettings = new MediaLibrarySettings(
        "/sitecore/media library",
        "ashx",
        "~/media/");

      var connection = new SessionConfig(this.env.InstanceUrl);
      var defaultSource = LegacyConstants.DefaultSource();

      this.session = new ScTestApiSession(connection, env.Users.Admin, this.mediaSettings, defaultSource);
      this.itemSource = new MutableItemSource("master", "en", 3872);
    }
 public void TearDown()
 {
   this.mediaSettings = null;
 }