local m=import("\046\047\082\101\110\100\101\114\083\101\116\116\105\110\103\115")local k=import("\046\046\047\116\121\112\101\111\102")describe("\102\117\110\099\116\105\111\110\115\046\115\101\116\116\105\110\103\115\046\082\101\110\100\101\114\083\101\116\116\105\110\103\115",function()it("\115\104\111\117\108\100 \098\101 \097\110 \111\098\106\101\099\116",function()local u=m.new()assert.not_nil(u)assert.equals(k(u),"\082\101\110\100\101\114\083\101\116\116\105\110\103\115")end)it("\115\104\111\117\108\100 \098\101 \111\102 \116\121\112\101 \082\101\110\100\101\114\083\101\116\116\105\110\103\115",function()local u=m.new()assert.equals(k(u),"\082\101\110\100\101\114\083\101\116\116\105\110\103\115")end)it("\115\104\111\117\108\100 \104\097\118\101 \097 \112\114\111\112\101\114\116\121 \081\117\097\108\105\116\121\076\101\118\101\108",function()local k=m.new()assert.equals(k.QualityLevel,0)end)it("\115\104\111\117\108\100 \097\108\108\111\119 \109\101 \116\111 \115\101\116 \116\104\101 \112\114\111\112\101\114\116\121 \081\117\097\108\105\116\121\076\101\118\101\108",function()local k=m.new()k.QualityLevel=1 assert.equals(k.QualityLevel,1)end)it("\115\104\111\117\108\100 \110\111\116 \097\108\108\111\119 \109\101 \116\111 \097\099\099\101\115\115 \117\110\100\101\102\105\110\101\100 \112\114\111\112\101\114\116\105\101\115",function()local k=m.new()assert.has.errors(function()tostring(k.thisDoesNotExist)end)end)it("\115\104\111\117\108\100 \110\111\116 \097\108\108\111\119 \109\101 \116\111 \115\101\116 \117\110\100\101\102\105\110\101\100 \112\114\111\112\101\114\116\105\101\115",function()local k=m.new()assert.has.errors(function()k.thisDoesNotExist="\116\104\105\115 \115\104\111\117\108\100 \116\104\114\111\119"end)end)end)
local RenderSettings = import("./RenderSettings")
local typeof = import("../typeof")

describe("functions.settings.RenderSettings", function()
	it("should be an object", function()
		local instance = RenderSettings.new()
		assert.not_nil(instance)
		assert.equals(typeof(instance), "RenderSettings")
	end)

	it("should be of type RenderSettings", function()
		local instance = RenderSettings.new()
		assert.equals(typeof(instance), "RenderSettings")
	end)

	it("should have a property QualityLevel", function()
		local instance = RenderSettings.new()
		assert.equals(instance.QualityLevel, 0)
	end)

	it("should allow me to set the property QualityLevel", function()
		local instance = RenderSettings.new()
		instance.QualityLevel = 1
		assert.equals(instance.QualityLevel, 1)
	end)

	it("should not allow me to access undefined properties", function()
		local instance = RenderSettings.new()
		assert.has.errors(function()
			tostring(instance.thisDoesNotExist)
		end)
	end)

	it("should not allow me to set undefined properties", function()
		local instance = RenderSettings.new()
		assert.has.errors(function()
			instance.thisDoesNotExist = "this should throw"
		end)
	end)
end)