public void AchievementIncrementRequiresAuthentication()
        {
            var mockClient        = new AchievementClient();
            var platform          = new PlayGamesPlatform(mockClient);
            var capturingCallback = new CapturingAction <bool>();

            mockClient.Authenticated = false;

            platform.IncrementAchievement("noAuth", 10, capturingCallback.invoke);

            Assert.IsFalse(capturingCallback.Captured);
        }
        public void AchievementReportProgressFailsWhenNotAuthenticated()
        {
            var mockClient = new AchievementClient();
            var platform   = new PlayGamesPlatform(mockClient);

            mockClient.Authenticated = false;
            var result = new CapturingAction <bool>();

            platform.ReportProgress("achievement", 0.0, result.invoke);

            Assert.IsFalse(result.Captured);
        }
        public void ReportScoreIsNoOpWhenUnauthenticated()
        {
            var mockClient        = new LeaderboardClient();
            var platform          = new PlayGamesPlatform(mockClient);
            var capturingCallback = new CapturingAction <bool>();

            mockClient.Authenticated = false;

            platform.ReportScore(100, "leaderboard", capturingCallback.invoke);
            Assert.IsNull(mockClient.SubmittedId);
            Assert.IsNull(mockClient.SubmittedScore);
            Assert.IsFalse(capturingCallback.Captured);
        }