return function()local z=require(script.Parent.Parent.generic.new)local Y=require(script.Parent.visualizeRadius)local Z=z({ClassName="\080\097\114\116",Size=Vector3.new(3,5,3)})local a=z({ClassName="\077\111\100\101\108";PrimaryPart=Z},{Primary=Z,Part=z({ClassName="\080\097\114\116";Size=Vector3.new(1,1,1),Position=Vector3.new(0,Z.Size.Y/2+.5,0)})})it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \110\101\119 \114\097\100\105\117\115",function()local z=a:Clone()local Z=20 local U=Color3.fromRGB(255,0,0)local G=Y(Z,z,U)local X=G:FindFirstChildOfClass("\067\121\108\105\110\100\101\114\077\101\115\104");(expect(G:IsDescendantOf(z))).to.equal(true);(expect(G.Color)).to.equal(U);(expect(X)).to.be.ok();(expect(X.Scale)).to.equal(Vector3.new(Z,1,Z))end)it("\115\104\111\117\108\100 \112\111\115\105\116\105\111\110 \116\104\101 \114\097\100\105\117\115 \097\116 \116\104\101 \098\111\116\116\111\109 \111\102 \116\104\101 \109\111\100\101\108",function()local z=a:Clone()local Z=Y(20,z,Color3.fromRGB(255,0,0))local U,G=z:GetBoundingBox()local X=U.p local I=Vector3.new(X.X,U.p.Y-G.Y/2,X.Z);(expect(Z.Position:FuzzyEq(I,1))).to.equal(true)end)it("\115\104\111\117\108\100 \098\101 \097\098\108\101 \116\111 \111\102\102\115\101\116 \116\104\101 \114\097\100\105\117\115 \116\111 \101\097\115\105\108\121 \108\097\121\101\114 \050 \111\114 \109\111\114\101",function()local z=a:Clone()local Z=Y(20,z,Color3.fromRGB(255,0,0),.1)local U=Y(30,z,Color3.fromRGB(0,255,0),0);(expect(Z.Position.Y>U.Position.Y)).to.equal(true)end)end
return function()
	local new = require(script.Parent.Parent.generic.new)
	local visualizeRadius = require(script.Parent.visualizeRadius)

	local MOCK_PRIMARY = new({
		ClassName = "Part",
		Size = Vector3.new(3, 5, 3),
	})

	local MOCK_MODEL = new({
		ClassName = "Model",
		PrimaryPart = MOCK_PRIMARY,
	}, {
		Primary = MOCK_PRIMARY,
		Part = new({
			ClassName = "Part",
			Size = Vector3.new(1, 1, 1),
			-- Places it on top of the primary part
			Position = Vector3.new(0, (MOCK_PRIMARY.Size.Y/2)+(1/2), 0)
		}),
	})

	it("should create a new radius", function()
		local model = MOCK_MODEL:Clone()

		local size = 20
		local color = Color3.fromRGB(255, 0, 0)

		local part = visualizeRadius(size, model, color)
		local mesh = part:FindFirstChildOfClass("CylinderMesh")

		expect(part:IsDescendantOf(model)).to.equal(true)
		expect(part.Color).to.equal(color)
		expect(mesh).to.be.ok()
		expect(mesh.Scale).to.equal(Vector3.new(size, 1, size))
	end)

	it("should position the radius at the bottom of the model", function()
		local model = MOCK_MODEL:Clone()

		local part = visualizeRadius(20, model, Color3.fromRGB(255, 0, 0))

		local cframe, size = model:GetBoundingBox()
		local pos = cframe.p

		local bottom = Vector3.new(pos.X, cframe.p.Y - (size.Y / 2), pos.Z)

		expect(part.Position:FuzzyEq(bottom, 1)).to.equal(true)
	end)

	it("should be able to offset the radius to easily layer 2 or more", function()
		local model = MOCK_MODEL:Clone()

		local part1 = visualizeRadius(20, model, Color3.fromRGB(255, 0, 0), 0.1)
		local part2 = visualizeRadius(30, model, Color3.fromRGB(0, 255, 0), 0)

		expect(part1.Position.Y > part2.Position.Y).to.equal(true)
	end)
end
