public void CompositeAchievement_StartsIncomplete() { var objective = new StatMAchievementTest(1); var achievement = new MCompositeAchievement("", objective); Assert.IsFalse(achievement.IsCompleted); }
public void StatAchievement_PartCompleted() { var achievement = new StatMAchievementTest(2); MEvents.RaiseEvent(new TestEvent(1)); Assert.IsTrue(Math.Abs(achievement.Progress - 0.5f) < 0.0001f); }
public void StatAchievement_NotCompleted() { var achievement = new StatMAchievementTest(2); MEvents.RaiseEvent(new TestEvent(1)); Assert.IsFalse(achievement.IsCompleted); }
public void StatAchievement_CompleteCorrect() { var achievement = new StatMAchievementTest(1); MEvents.RaiseEvent(new TestEvent(1)); Assert.IsTrue(achievement.IsCompleted); }
public void CompositeAchievement_CompletesFor1Objective() { var objective = new StatMAchievementTest(1); var achievement = new MCompositeAchievement("", objective); MEvents.RaiseEvent(new TestEvent(1)); Assert.IsTrue(achievement.IsCompleted); }
public void CompositeAchievement_PartialCompletion() { var objective1 = new StatMAchievementTest(1); var objective2 = new StatMAchievementTest(2); var achievement = new MCompositeAchievement("", objective1, objective2); MEvents.RaiseEvent(new TestEvent(1)); Assert.IsTrue(Math.Abs(achievement.Progress - 0.5f) < 0.0001f); }
public void CompositeAchievement_NestedCompletion() { var objective1 = new StatMAchievementTest(1); var objective2 = new StatMAchievementTest(2); var objective3 = new MCompositeAchievement("", objective1, objective2); var objective4 = new StatMAchievementTest(3); var achievement = new MCompositeAchievement("", objective3, objective4); MEvents.RaiseEvent(new TestEvent(3)); Assert.IsTrue(achievement.IsCompleted); }
public void StatAchievement_StartsIncomplete() { var achievement = new StatMAchievementTest(1); Assert.IsFalse(achievement.IsCompleted); }
public void CompositeAchievement_DuplicateObjectives() { var objective = new StatMAchievementTest(1); Assert.Throws <ArgumentException>(() => { new MCompositeAchievement("", objective, objective); }); }