1
1
using Backtrace . Unity . Model ;
2
2
using Backtrace . Unity . Services ;
3
3
using NUnit . Framework ;
4
- using System ;
5
4
using System . Collections . Generic ;
6
5
using UnityEngine ;
7
6
using NativeClient = Backtrace . Unity . Runtime . Native . Windows . NativeClient ;
7
+
8
8
namespace Backtrace . Unity . Tests . Runtime . Native . Windows
9
9
{
10
10
public sealed class ScopedNativeAttributesTests
@@ -43,7 +43,7 @@ public void LegacyAttributesSupport_ShouldIncludeLegacyAttributesWhenScopedAttri
43
43
[ Test ]
44
44
public void NativeCrashUploadAttributes_ShouldSetValuesInPlayerPrefs_ValuesAreAvailableInPlayerPrefs ( )
45
45
{
46
- var configuration = new BacktraceConfiguration ( ) ;
46
+ var configuration = ScriptableObject . CreateInstance < BacktraceConfiguration > ( ) ;
47
47
configuration . SendUnhandledGameCrashesOnGameStartup = true ;
48
48
const string testAttributeString = "foo-key" ;
49
49
const string testAttributeValue = "foo-bar-value" ;
@@ -64,7 +64,7 @@ public void NativeCrashUploadAttributesSetting_ShouldReadPlayerPrefsWithLegacyAt
64
64
string sessionKey = "session-foo-bar-baz" ;
65
65
PlayerPrefs . SetString ( NativeClient . SessionKey , sessionKey ) ;
66
66
67
- var configuration = new BacktraceConfiguration ( ) ;
67
+ var configuration = ScriptableObject . CreateInstance < BacktraceConfiguration > ( ) ;
68
68
configuration . SendUnhandledGameCrashesOnGameStartup = true ;
69
69
const string testAttributeString = "foo-key" ;
70
70
const string testAttributeValue = "foo-bar-value" ;
@@ -82,7 +82,7 @@ public void NativeCrashUploadAttributesSetting_ShouldReadPlayerPrefsWithLegacyAt
82
82
public void NativeCrashUploadAttributes_ShouldSetScopedAttributeViaNativeClientApi_AttributePresentsInScopedAttributes ( )
83
83
{
84
84
85
- var configuration = new BacktraceConfiguration ( ) ;
85
+ var configuration = ScriptableObject . CreateInstance < BacktraceConfiguration > ( ) ;
86
86
configuration . SendUnhandledGameCrashesOnGameStartup = true ;
87
87
const string testAttributeKey = "foo-key-bar-baz" ;
88
88
const string testAttributeValue = "123123" ;
@@ -104,7 +104,7 @@ public void NativeCrashAttributesCleanMethod_ShouldCleanAllScopedAttribtues_Scop
104
104
PlayerPrefs . SetString ( NativeClient . MachineUuidKey , machineUuid ) ;
105
105
string sessionKey = "session-foo-bar-baz" ;
106
106
PlayerPrefs . SetString ( NativeClient . SessionKey , sessionKey ) ;
107
- var configuration = new BacktraceConfiguration ( ) ;
107
+ var configuration = ScriptableObject . CreateInstance < BacktraceConfiguration > ( ) ;
108
108
configuration . SendUnhandledGameCrashesOnGameStartup = true ;
109
109
const string testAttributeString = "foo-key" ;
110
110
const string testAttributeValue = "foo-bar-value" ;
0 commit comments