public IEnumerator B_キーが存在しない場合はFalse()
        {
            PlayerPrefs.SetString(Key + "_", "some value");

            yield return(KeyValueStore
                         .Has(Key)
                         .ToCoroutine(x => Assert.That(x, Is.False)));
        }
        public IEnumerator A_キーが存在する場合はTrue()
        {
            PlayerPrefs.SetString(Key, "some value");

            yield return(KeyValueStore
                         .Has(Key)
                         .ToCoroutine(x => Assert.That(x, Is.True)));
        }
Beispiel #3
0
        public IEnumerator Checkerをキャンセル()
        {
            var source = new CancellationTokenSource();

            AsyncChecker.When(x => x.HasAsync(Key, source.Token)).Do(_ => source.Cancel());

            yield return(KeyValueStore.Has(Key, source.Token).ToCoroutine());

            Assert.That(source.IsCancellationRequested, Is.True);
        }
        public IEnumerator 基本メソッド()
        {
            yield return(KeyValueStore
                         .Has(Key)
                         .ToCoroutine(x => Assert.That(x, Is.False)));

            yield return(KeyValueStore
                         .Get(Key, "DefaultValue")
                         .ToCoroutine(x => Assert.That(x, Is.EqualTo("DefaultValue"))));

            yield return(KeyValueStore
                         .Set(Key, "NewValue")
                         .ToCoroutine());

            yield return(KeyValueStore
                         .Has(Key)
                         .ToCoroutine(x => Assert.That(x, Is.True)));

            yield return(KeyValueStore
                         .Get <string>(Key)
                         .ToCoroutine(x => Assert.That(x, Is.EqualTo("NewValue"))));
        }
Beispiel #5
0
 public SystemUnderTest WithServerCountSample(ServerCountSample sample)
 {
     KeyValueStore.Has(sample);
     return(this);
 }