12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- using LLM.Editor.Data;
- using Newtonsoft.Json.Linq;
- using JetBrains.Annotations;
- using System.Collections.Generic;
- namespace LLM.Editor.Tests.Integration
- {
- [UsedImplicitly]
- public class CreateSpinningCubeTest : IDummyTestCase
- {
- public string TriggerPhrase => "Create a spinning cube";
- public List<List<CommandData>> GetCommandSteps()
- {
- var step1 = new List<CommandData>
- {
- new()
- {
- commandName = "UpdateWorkingContextCommand",
- jsonData = new JObject
- {
- ["updates"] = new JObject
- {
- ["plan"] = new JArray(
- "Create a new Cube GameObject named 'SpinningCube'.",
- "Create a new C# script named 'Spinner'.",
- "Attach the 'Spinner' script to the 'SpinningCube'."
- )
- }
- }
- },
- new()
- {
- commandName = "CreateGameObjectCommand",
- jsonData = new JObject
- {
- ["gameObjectName"] = "SpinningCube",
- ["logicalName"] = "TestCube_1",
- ["primitiveType"] = "Cube"
- }
- },
- new()
- {
- commandName = "CreateAssetCommand",
- jsonData = new JObject
- {
- ["assetType"] = "Script",
- ["assetName"] = "Spinner",
- ["logicalName"] = "TestSpinnerScript_1",
- ["content"] = "using UnityEngine; public class Spinner : MonoBehaviour { public float speed = 50f; void Update() { transform.Rotate(Vector3.up, speed * Time.deltaTime); } }"
- }
- },
- new()
- {
- commandName = "AddComponentToAssetCommand",
- jsonData = new JObject
- {
- ["targetIdentifier"] = "TestCube_1",
- ["scriptName"] = "Spinner"
- }
- }
- };
-
- return new List<List<CommandData>> { step1 };
- }
- }
- }
|