gutterball-3/Gutterball 3/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs
SkunkStudios 1c033119df New Version 1.42
Moving cam replay.
Fixed the bugs.

New Version 1.42

Moving cam replay.
Fixed the bugs.

New Version 1.42

Moving cam replay,
Fixed the bugs.
2025-01-29 16:19:11 +07:00

34 lines
1 KiB
C#

using System;
using NUnit.Framework;
namespace UnityEngine.Analytics.Tests
{
public partial class AnalyticsEventTests
{
[Test]
public void AchievementUnlocked_AchievementIdTest(
[Values("unit_tester", "", null)] string achievementId
)
{
if (string.IsNullOrEmpty(achievementId))
{
Assert.Throws<ArgumentException>(() => AnalyticsEvent.AchievementUnlocked(achievementId));
}
else
{
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementUnlocked(achievementId));
EvaluateAnalyticsResult(m_Result);
}
}
[Test]
public void AchievementUnlocked_CustomDataTest()
{
var achievementId = "unit_tester";
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementUnlocked(achievementId, m_CustomData));
EvaluateCustomData(m_CustomData);
EvaluateAnalyticsResult(m_Result);
}
}
}