public void TrySetProgress_ReturnsCorrentValue(AsyncOperationStatus status, bool expectedResult) { // Arrange var op = new AsyncCompletionSource(status); // Act var result = op.TrySetProgress(1); // Assert Assert.Equal(expectedResult, result); }
public void Progress_ReturnsCorrentValue(AsyncOperationStatus status, float expectedValue) { // Arrange var progress = 0.3f; var op = new AsyncCompletionSource(status); // Act op.TrySetProgress(progress); // Assert Assert.Equal(expectedValue, op.Progress); }