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)); }
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)); }
void Awake() { accessor = PowerPrefs.ForInt().KeyAccessor(KeyCounter); CounterChanged(accessor.Get()); }