public void GivenForChar_WhenSet_ThenCharStoredAsString() { var expected = 'a'; PlayerPrefs.SetString(TestKey, "someOldValue"); PowerPrefs.ForChar().Set(TestKey, expected); Assert.That(PlayerPrefs.GetString(TestKey, "")[0], Is.EqualTo(expected)); }
public void GivenForChar_WhenGet_ThenCharRetrieved() { var expected = 'd'; PlayerPrefs.SetString(TestKey, expected.ToString()); var actual = PowerPrefs.ForChar().Get(TestKey, 'x'); Assert.That(actual, Is.EqualTo(expected)); }