diff --git a/nekoyume/Assets/Tests/EditMode/State/AsyncUpdatableRxPropTest.cs b/nekoyume/Assets/Tests/EditMode/State/AsyncUpdatableRxPropTest.cs index 71d8c5bb76..0fde61389e 100644 --- a/nekoyume/Assets/Tests/EditMode/State/AsyncUpdatableRxPropTest.cs +++ b/nekoyume/Assets/Tests/EditMode/State/AsyncUpdatableRxPropTest.cs @@ -1,10 +1,12 @@ -using System.Collections; +using System.Collections; using System.Threading.Tasks; using Cysharp.Threading.Tasks; using Nekoyume.State; using NUnit.Framework; using UnityEngine.TestTools; using UniRx; +using Libplanet.Common; +using System.Security.Cryptography; namespace Tests.EditMode.State { @@ -31,7 +33,7 @@ public void ConstructWithDefaultValueTest(int value) public IEnumerator UpdateAsyncTest() => UniTask.ToCoroutine(async () => { var rp = new AsyncUpdatableRxProp(UpdateValueAsync); - var value = await rp.UpdateAsync(); + var value = await rp.UpdateAsync(new HashDigest()); Assert.AreEqual(1, value); Assert.AreEqual(value, rp.Value); }); @@ -40,9 +42,9 @@ public IEnumerator UpdateAsyncTest() => UniTask.ToCoroutine(async () => public IEnumerator UpdateAsObservableTest() => UniTask.ToCoroutine(async () => { var rp = new AsyncUpdatableRxProp(UpdateValueAsync); - var value = await rp.UpdateAsObservable().ToUniTask(); + var value = await rp.UpdateAsObservable(new HashDigest()).ToUniTask(); Assert.AreEqual(1, value); - value = await rp.UpdateAsObservable().ToUniTask(); + value = await rp.UpdateAsObservable(new HashDigest()).ToUniTask(); Assert.AreEqual(2, value); }); @@ -62,7 +64,8 @@ public IEnumerator SubscribeWithUpdateOnceTest() => UniTask.ToCoroutine(async () } expected++; - }); + }, + new HashDigest()); await UniTask.WaitUntil(() => done); disposable.Dispose(); }); @@ -82,14 +85,14 @@ public IEnumerator SubscribeTest() => UniTask.ToCoroutine(async () => return; } - rp.UpdateAsync().Forget(); + rp.UpdateAsync(new HashDigest()).Forget(); expected++; }); await UniTask.WaitUntil(() => done); disposable.Dispose(); }); - private static async Task UpdateValueAsync(int previous) + private static async Task UpdateValueAsync(int previous, HashDigest stateRootHash) { await UniTask.Delay(10); return previous + 1;