diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests.cs
index e1acd7b58..98783f0fc 100644
--- a/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests.cs
+++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests.cs
@@ -13,7 +13,9 @@ public void NetworkBehaviourServer()
{
Assert.That(CompilationFinishedHook.WeaveFailed, Is.False);
Assert.That(weaverErrors, Is.Empty);
- CheckAddedCodeServer();
+ string networkServerGetActive = Weaver.NetworkServerGetActive.ToString();
+ CheckAddedCode(networkServerGetActive, "MirrorTest.NetworkBehaviourServer", "ServerOnlyMethod");
+
}
[Test]
@@ -21,19 +23,8 @@ public void NetworkBehaviourClient()
{
Assert.That(CompilationFinishedHook.WeaveFailed, Is.False);
Assert.That(weaverErrors, Is.Empty);
- CheckAddedCodeClient();
- }
-
- static void CheckAddedCodeServer()
- {
- string networkServerGetActive = Weaver.NetworkServerGetActive.ToString();
- CheckAddedCode(networkServerGetActive, "ServerOnlyMethod");
- }
-
- static void CheckAddedCodeClient()
- {
string networkClientGetActive = Weaver.NetworkClientGetActive.ToString();
- CheckAddedCode(networkClientGetActive, "ClientOnlyMethod");
+ CheckAddedCode(networkClientGetActive, "MirrorTest.NetworkBehaviourClient", "ClientOnlyMethod");
}
///
@@ -41,10 +32,8 @@ static void CheckAddedCodeClient()
///
///
///
- static void CheckAddedCode(string addedString, string methodName)
+ static void CheckAddedCode(string addedString, string className, string methodName)
{
- string className = "MirrorTest.MirrorTestPlayer";
-
string assemblyName = Path.Combine(WeaverAssembler.OutputDirectory, WeaverAssembler.OutputFile);
using (AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(assemblyName))
{
diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests~/NetworkBehaviourClient.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests~/NetworkBehaviourClient.cs
index 21c14c859..30271ca83 100644
--- a/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests~/NetworkBehaviourClient.cs
+++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests~/NetworkBehaviourClient.cs
@@ -5,7 +5,7 @@
namespace MirrorTest
{
- class MirrorTestPlayer : NetworkBehaviour
+ class NetworkBehaviourClient : NetworkBehaviour
{
[Client]
void ClientOnlyMethod()
diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests~/NetworkBehaviourServer.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests~/NetworkBehaviourServer.cs
index 095f1613f..363af3c45 100644
--- a/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests~/NetworkBehaviourServer.cs
+++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverClientServerAttributeTests~/NetworkBehaviourServer.cs
@@ -5,7 +5,7 @@
namespace MirrorTest
{
- class MirrorTestPlayer : NetworkBehaviour
+ class NetworkBehaviourServer : NetworkBehaviour
{
[Server]
void ServerOnlyMethod()