Esempio n. 1
0
        public void GivenForInt_WhenGet_ThenIntRetrieved()
        {
            var expected = 10;

            PlayerPrefs.SetInt(TestKey, expected);

            var actual = PowerPrefs.ForInt().Get(TestKey, 100);

            Assert.That(actual, Is.EqualTo(expected));
        }
Esempio n. 2
0
        public void GivenForInt_WhenSet_ThenIntStored()
        {
            var expected = 100;

            PlayerPrefs.SetInt(TestKey, 10);

            PowerPrefs.ForInt().Set(TestKey, expected);

            Assert.That(PlayerPrefs.GetInt(TestKey, 10), Is.EqualTo(expected));
        }
Esempio n. 3
0
 void Awake()
 {
     accessor = PowerPrefs.ForInt().KeyAccessor(KeyCounter);
     CounterChanged(accessor.Get());
 }