Add gRPC client module and its corresponding test case
This commit is contained in:
19
Client/Assets/Scripts/Test/GrpcClientTest.cs
Normal file
19
Client/Assets/Scripts/Test/GrpcClientTest.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using Network;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Test
|
||||
{
|
||||
public class GrpcClientTest : MonoBehaviour
|
||||
{
|
||||
private async void Start()
|
||||
{
|
||||
var serverInfo = await GrpcClient.Instance.GetServerInfo();
|
||||
|
||||
Debug.Log($"Received info from server: {serverInfo}");
|
||||
|
||||
var loginResult = await GrpcClient.Instance.Login("野兽先辈", "114514");
|
||||
|
||||
Debug.Log($"Received login result: {loginResult.Result}");
|
||||
}
|
||||
}
|
||||
}
|
3
Client/Assets/Scripts/Test/GrpcClientTest.cs.meta
Normal file
3
Client/Assets/Scripts/Test/GrpcClientTest.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98c1b145899d4d97bd981b177b5c45a9
|
||||
timeCreated: 1752478138
|
Reference in New Issue
Block a user