public async Task Int_DuplicateTryAddStateAsyncTest() { var instance = new MockActorStateManager(); await instance.TryAddStateAsync("existing", 6); var result = await instance.TryAddStateAsync("existing", 6); Assert.IsFalse(result); }
public async Task Int_TryGetStateAsyncTest() { var instance = new MockActorStateManager(); await instance.TryAddStateAsync("existing", 6); var result = await instance.TryGetStateAsync <int>("existing"); Assert.IsInstanceOfType(result, typeof(ConditionalValue <int>)); Assert.IsNotNull(result.Value); Assert.IsTrue(result.HasValue); Assert.AreEqual(6, result.Value); }