You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
1.0 KiB

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);
}
}
}