public void GivenForLong_WhenGet_ThenLongRetrieved() { var expected = 123; PlayerPrefs.SetString(TestKey, expected.ToString()); var actual = PowerPrefs.ForLong().Get(TestKey, -1); Assert.That(actual, Is.EqualTo(expected)); }
public void GivenForLong_WhenSet_ThenLongStoredAsString() { var expected = 22; PlayerPrefs.SetString(TestKey, "55"); PowerPrefs.ForLong().Set(TestKey, expected); var actual = long.Parse(PlayerPrefs.GetString(TestKey, "-1")); Assert.That(actual, Is.EqualTo(expected)); }