--[[----------------------------------------------------------------------------

ADOBE CONFIDENTIAL
------------------
Copyright 2022 Adobe
All Rights Reserved.

NOTICE: All information contained herein is, and remains
the property of Adobe and its suppliers, if any. The intellectual
and technical concepts contained herein are proprietary to Adobe
and its suppliers and are protected by all applicable intellectual
property laws, including trade secret and copyright laws.
Dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from Adobe.

----------------------------------------------------------------------------]]--

	-- WF.core.self_test
local WFRxTestCase = require 'WFRxTestCase'

	-- WF.core
local WFConfigDotLuaUtils = require 'WFConfigDotLuaUtils'

--------------------------------------------------------------------------------

local WFConfigDotLuaUtilsTest = {}

--------------------------------------------------------------------------------

function WFConfigDotLuaUtilsTest.rxTestBasic( rxTest )

	local backupContents = WFConfigDotLuaUtils.getConfigDotLuaContents()

	rxTest:finally( function()
	
		-- Restore settings
		
		WFConfigDotLuaUtils.setConfigDotLuaContents( backupContents )
	
	end )

	local fooContents = 'foo'
	
	WFConfigDotLuaUtils.setConfigDotLuaContents( fooContents )

	local contents = WFConfigDotLuaUtils.getConfigDotLuaContents()
	
	rxTest:expectEqual( fooContents, contents )
	
	local barContents = 'bar'
	
	WFConfigDotLuaUtils.setConfigDotLuaContents( barContents )

	contents = WFConfigDotLuaUtils.getConfigDotLuaContents()
	
	rxTest:expectEqual( barContents, contents )

end

--------------------------------------------------------------------------------

return WFRxTestCase.wrapSuite( 'WFConfigDotLuaUtilsTest', WFConfigDotLuaUtilsTest )
