chore: initialize standalone UPM package
Publish UPM package / publish (push) Failing after 1s

This commit is contained in:
2026-08-26 02:50:38 +08:00
commit 05bfe9c430
43 changed files with 1417 additions and 0 deletions
@@ -0,0 +1,18 @@
{
"name": "ShrinkNetwork.Integration.EventBus.Tests",
"rootNamespace": "ShrinkNetwork.Integration.EventBus.Tests",
"references": [
"ShrinkNetwork.Integration.EventBus",
"ShrinkNetwork.Runtime",
"ShrinkEventBus.Runtime",
"UniTask",
"UnityEngine.TestRunner",
"UnityEditor.TestRunner"
],
"includePlatforms": ["Editor"],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"autoReferenced": false,
"defineConstraints": ["UNITY_INCLUDE_TESTS"]
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 132ab80308b64e7abf3a68bb161b7d2f
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+36
View File
@@ -0,0 +1,36 @@
#nullable enable
using NUnit.Framework;
using ShrinkEventBus;
namespace ShrinkNetwork.Integration.EventBus.Tests
{
[ShrinkNetworkEvent]
[ShrinkNetworkMessage(49001, "tests/generated_event")]
internal sealed class GeneratedNetworkEvent : IShrinkEvent, IShrinkNetworkMessage
{
}
public sealed class ShrinkNetworkEventCodeGenTests
{
[Test]
public void GeneratedRegistrationAddsNetworkEventToService()
{
var service = new ShrinkNetworkService(
new ShrinkJsonNetworkSerializer(),
new ShrinkNetworkMessageRegistry(),
new ShrinkNetworkRouter());
ShrinkNetworkEventBusBridge.RegisterService(service);
try
{
Assert.IsTrue(service.MessageRegistry.TryGetMeta(typeof(GeneratedNetworkEvent), out var meta));
Assert.AreEqual(49001, meta!.Opcode);
Assert.AreEqual("tests/generated_event", meta.Route);
}
finally
{
ShrinkNetworkEventBusBridge.UnregisterService(service);
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7d790812eb9845b0820da061de4d7fe5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: