inst/unitTests/test_synapseDataLocationPreferences.R

## Test data location preferences
## 
## Author: Nicole Deflaxu <nicole.deflaux@sagebase.org>
###############################################################################

.setUp <- 
  function()
{
  synapseClient:::.setCache("untiTestSavedLocationPrefs", synapseClient:::synapseDataLocationPreferences())
}

.tearDown <- 
  function()
{
  synapseClient:::synapseDataLocationPreferences(synapseClient:::.getCache("untiTestSavedLocationPrefs"))
  synapseClient:::.deleteCache("untiTestSavedLocationPrefs")
}

unitTestHappyCase <- 
  function()
{ 
  synapseClient:::synapseDataLocationPreferences(c('awss3'))
}

unitTestInvalidLocationPref <- 
  function() 
{
  checkException(synapseClient:::synapseDataLocationPreferences(c('invalid', 'awss3')))
}
Sage-Bionetworks/rSynapseClientRewrite documentation built on May 9, 2019, 7:06 p.m.