Beispiel #1
0
        public void Configure_DefaultConfiguration_SetsScopeObserver()
        {
            var options = new SentryUnityOptions();

            SentryNativeIos.Configure(options);
            Assert.IsAssignableFrom <IosNativeScopeObserver>(options.ScopeObserver);
        }
Beispiel #2
0
        public void Configure_DefaultConfiguration_EnablesScopeSync()
        {
            var options = new SentryUnityOptions();

            SentryNativeIos.Configure(options);
            Assert.True(options.EnableScopeSync);
        }
Beispiel #3
0
        public void Configure_DefaultConfiguration_SetsCrashedLastRun()
        {
            var options = new SentryUnityOptions();

            SentryNativeIos.Configure(options);
            Assert.IsNotNull(options.CrashedLastRun);
        }
Beispiel #4
0
        public void Configure_NativeIosSupportDisabled_DisabledScopeSync()
        {
            var options = new SentryUnityOptions {
                IosNativeSupportEnabled = false
            };

            SentryNativeIos.Configure(options);
            Assert.False(options.EnableScopeSync);
        }
Beispiel #5
0
        public void Configure_NativeIosSupportDisabled_ObserverIsNull()
        {
            var options = new SentryUnityOptions {
                IosNativeSupportEnabled = false
            };

            SentryNativeIos.Configure(options);
            Assert.Null(options.ScopeObserver);
        }
Beispiel #6
0
        public static void Init()
        {
            var options = ScriptableSentryUnityOptions.LoadSentryUnityOptions();

            if (options.ShouldInitializeSdk())
            {
                var sentryUnityInfo = new SentryUnityInfo();

#if SENTRY_NATIVE_IOS
                SentryNativeIos.Configure(options);
#elif SENTRY_NATIVE_ANDROID
                SentryNativeAndroid.Configure(options, sentryUnityInfo);
#elif SENTRY_NATIVE_WINDOWS
                SentryNative.Configure(options);
#endif

                SentryUnity.Init(options);
            }
        }