Beispiel #1
0
        public void GivenForFloat_WhenSet_ThenFloatStored()
        {
            var expected = 100f;

            PlayerPrefs.SetFloat(TestKey, 10f);

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

            Assert.That(PlayerPrefs.GetFloat(TestKey, 10f), Is.EqualTo(expected));
        }
Beispiel #2
0
        public void GivenForFloat_WhenGet_ThenFloatRetrieved()
        {
            var expected = 10f;

            PlayerPrefs.SetFloat(TestKey, expected);

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

            Assert.That(actual, Is.EqualTo(expected));
        }