# Tests res://scripts/camera_state.gd defaults and field round-trip.
extends GdUnitTestSuite

const CameraStateScript := preload("res://scripts/camera_state.gd")


func test_default_yaw_is_zero() -> void:
	# Arrange
	var s = CameraStateScript.new()
	# Act
	var yaw: float = s.yaw
	# Assert
	assert_that(yaw).is_equal(0.0)


func test_fields_round_trip() -> void:
	# Arrange
	var s = CameraStateScript.new()
	# Act
	s.follow_target_path = NodePath("../Player")
	s.distance = 18.5
	s.zoom_band_index = 2
	s.focus_world = Vector3(1.0, 2.0, 3.0)
	s.yaw = 0.12
	# Assert
	assert_that(s.follow_target_path).is_equal(NodePath("../Player"))
	assert_that(s.distance).is_equal(18.5)
	assert_that(s.zoom_band_index).is_equal(2)
	assert_that(s.focus_world).is_equal(Vector3(1.0, 2.0, 3.0))
	assert_that(s.yaw).is_equal(0.12)
