Ejemplo n.º 1
0
        public void LoadStateSucceedsWhenLoggedIn()
        {
            var mockClient = new CloudSaveClient();
            var platform   = new PlayGamesPlatform(mockClient);
            var listener   = new CapturingStateListener();

            platform.LoadState(3, listener);

            Assert.AreEqual(3, mockClient.Slot);
            Assert.AreSame(listener, mockClient.Listener);
        }
Ejemplo n.º 2
0
        public void LoadStateFailsWhenNotLoggedIn()
        {
            var mockClient = new CloudSaveClient();
            var platform   = new PlayGamesPlatform(mockClient);
            var listener   = new CapturingStateListener();

            mockClient.Authenticated = false;

            platform.LoadState(3, listener);

            Assert.AreEqual(3, listener.SlotForLastOperation);
            Assert.IsNull(listener.DataForLastOperation);
            Assert.IsFalse(listener.LastOperationSucceeded.Value);
        }