public void GetSentryPlatformName_RecognizedPlatform_SetsSentryCliName(RuntimePlatform platform, string expectedName) { var application = new TestApplication(platform: platform); var actualName = SentryCli.GetSentryCliPlatformName(application); Assert.AreEqual(expectedName, actualName); }
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); }
public void GetSentryCliPlatformName_UnrecognizedPlatform_ThrowsInvalidOperationException() { var application = new TestApplication(platform: RuntimePlatform.CloudRendering); Assert.Throws <InvalidOperationException>(() => SentryCli.GetSentryCliPlatformName(application)); }