public void VerifyIsSyncSafe(SourceOrign origin) { var source = Create <int>(origin); // Yes this looks stupid, but it's the proper pattern for how we statically init now // ...and if we're dropping NET45 support, we can just nuke it all. #if NET462 Assert.True(TaskSource.IsSyncSafe(source.Task)); #elif NETCOREAPP2_0 Assert.True(TaskSource.IsSyncSafe(source.Task)); #endif }
public void VerifyIsSyncSafe(SourceOrign origin, bool expected) { var source = Create <int>(origin); Assert.AreEqual(expected, TaskSource.IsSyncSafe(source.Task)); }