コード例 #1
0
        public void GetSentryPlatformName_RecognizedPlatform_SetsSentryCliName(RuntimePlatform platform, string expectedName)
        {
            var application = new TestApplication(platform: platform);

            var actualName = SentryCli.GetSentryCliPlatformName(application);

            Assert.AreEqual(expectedName, actualName);
        }
コード例 #2
0
        public void GetSentryCliPath_ValidFileName_ReturnsPath()
        {
            var sentryCliPlatformName = SentryCli.GetSentryCliPlatformName(new TestApplication(platform: Application.platform));
            var expectedPath          = Path.GetFullPath(
                Path.Combine("Packages", SentryPackageInfo.GetName(), "Editor", "sentry-cli", sentryCliPlatformName));

            var actualPath = SentryCli.GetSentryCliPath(sentryCliPlatformName);

            Assert.AreEqual(expectedPath, actualPath);
        }
コード例 #3
0
        public void GetSentryCliPlatformName_UnrecognizedPlatform_ThrowsInvalidOperationException()
        {
            var application = new TestApplication(platform: RuntimePlatform.CloudRendering);

            Assert.Throws <InvalidOperationException>(() => SentryCli.GetSentryCliPlatformName(application));
        }