예제 #1
0
        public void ProvisionTestFiles()
        {
            string siteUrl = _source._tenantUrl + _source._siteName;

            _sourceContext          = SPData.GetOnlineContext(siteUrl, _source._username, _source._password);
            _sourceItemsCollections = _testDataProvider.ProvisionAndGetFiles(_sourceContext, _source._listName, true);

            string destionationUrl = _target._tenantUrl + _target.SiteName;

            _destinationContext = SPData.GetOnlineContext(destionationUrl, _target._username, _target._password);
            //Check is fetched data with modified date or Id
            if (!_isModifiedQueryEnabled)
            {
                // fetched destionation data with Id
                _listDestinationItemsCollections = new List <ListItemCollection>();
                ListItemCollection destinationItemsCollections = _testDataProvider.ProvisionAndGetFiles(_destinationContext, _target.ListName, false);
                _destinationContext.Load(destinationItemsCollections);
                if (destinationItemsCollections.Count > 0)
                {
                    _listDestinationItemsCollections.Add(destinationItemsCollections);
                }
            }
            else
            {
                //fetched destionation data based on source Items Id
                _listDestinationItemsCollections = _testDataProvider.GetDestinationFiles(_destinationContext, _target.ListName, _sourceItemsCollections);
            }
            //getUser();
        }
예제 #2
0
 public void ProvisionTestFiles()
 {
     _filesToMigrate = _testDataProvider.ProvisionAndGetFiles();
 }