1
0

ApiApprovalTests.Testing.verified.cs 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. [assembly: System.CLSCompliant(true)]
  2. [assembly: System.Runtime.InteropServices.ComVisible(false)]
  3. [assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName=".NET Framework 4.7.2")]
  4. namespace Microsoft.Reactive.Testing
  5. {
  6. public interface ITestableObservable<T> : System.IObservable<T>
  7. {
  8. System.Collections.Generic.IList<Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>>> Messages { get; }
  9. System.Collections.Generic.IList<Microsoft.Reactive.Testing.Subscription> Subscriptions { get; }
  10. }
  11. public interface ITestableObserver<T> : System.IObserver<T>
  12. {
  13. System.Collections.Generic.IList<Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>>> Messages { get; }
  14. }
  15. public static class ReactiveAssert
  16. {
  17. public static void AreElementsEqual<T>(System.Collections.Generic.IEnumerable<T> expected, System.Collections.Generic.IEnumerable<T> actual) { }
  18. public static void AreElementsEqual<T>(System.IObservable<T> expected, System.IObservable<T> actual) { }
  19. public static void AreElementsEqual<T>(System.Collections.Generic.IEnumerable<T> expected, System.Collections.Generic.IEnumerable<T> actual, System.Collections.Generic.IEqualityComparer<T> comparer) { }
  20. public static void AreElementsEqual<T>(System.Collections.Generic.IEnumerable<T> expected, System.Collections.Generic.IEnumerable<T> actual, string message) { }
  21. public static void AreElementsEqual<T>(System.IObservable<T> expected, System.IObservable<T> actual, System.Collections.Generic.IEqualityComparer<T> comparer) { }
  22. public static void AreElementsEqual<T>(System.IObservable<T> expected, System.IObservable<T> actual, string message) { }
  23. public static void AreElementsEqual<T>(System.Collections.Generic.IEnumerable<T> expected, System.Collections.Generic.IEnumerable<T> actual, System.Collections.Generic.IEqualityComparer<T> comparer, string message) { }
  24. public static void AreElementsEqual<T>(System.IObservable<T> expected, System.IObservable<T> actual, System.Collections.Generic.IEqualityComparer<T> comparer, string message) { }
  25. public static void AssertEqual<T>(this System.Collections.Generic.IEnumerable<T> actual, System.Collections.Generic.IEnumerable<T> expected) { }
  26. public static void AssertEqual<T>(this System.Collections.Generic.IEnumerable<T> actual, params T[] expected) { }
  27. public static void AssertEqual<T>(this System.IObservable<T> actual, System.IObservable<T> expected) { }
  28. public static void AssertEqual<T>(this System.Collections.Generic.IEnumerable<T> actual, System.Collections.Generic.IEnumerable<T> expected, System.Collections.Generic.IEqualityComparer<T> comparer) { }
  29. public static void AssertEqual<T>(this System.IObservable<T> actual, System.IObservable<T> expected, System.Collections.Generic.IEqualityComparer<T> comparer) { }
  30. public static void Throws<TException>(System.Action action)
  31. where TException : System.Exception { }
  32. public static void Throws<TException>(System.Action action, string message)
  33. where TException : System.Exception { }
  34. public static void Throws<TException>(TException exception, System.Action action)
  35. where TException : System.Exception { }
  36. public static void Throws<TException>(TException exception, System.Action action, string message)
  37. where TException : System.Exception { }
  38. }
  39. public class ReactiveTest
  40. {
  41. public const long Created = 100;
  42. public const long Disposed = 1000;
  43. public const long Subscribed = 200;
  44. public ReactiveTest() { }
  45. public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnCompleted<T>(long ticks) { }
  46. public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnCompleted<T>(long ticks, T witness) { }
  47. public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnError<T>(long ticks, System.Exception exception) { }
  48. public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnError<T>(long ticks, System.Func<System.Exception, bool> predicate) { }
  49. public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnError<T>(long ticks, System.Exception exception, T witness) { }
  50. public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnError<T>(long ticks, System.Func<System.Exception, bool> predicate, T witness) { }
  51. public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnNext<T>(long ticks, System.Func<T, bool> predicate) { }
  52. public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnNext<T>(long ticks, T value) { }
  53. public static Microsoft.Reactive.Testing.Subscription Subscribe(long start) { }
  54. public static Microsoft.Reactive.Testing.Subscription Subscribe(long start, long end) { }
  55. }
  56. [System.Diagnostics.DebuggerDisplay("{Value}@{Time}")]
  57. [System.Serializable]
  58. public readonly struct Recorded<T> : System.IEquatable<Microsoft.Reactive.Testing.Recorded<T>>
  59. {
  60. public Recorded(long time, T value) { }
  61. public long Time { get; }
  62. public T Value { get; }
  63. public bool Equals(Microsoft.Reactive.Testing.Recorded<T> other) { }
  64. public override bool Equals(object obj) { }
  65. public override int GetHashCode() { }
  66. public override string ToString() { }
  67. public static bool operator !=(Microsoft.Reactive.Testing.Recorded<T> left, Microsoft.Reactive.Testing.Recorded<T> right) { }
  68. public static bool operator ==(Microsoft.Reactive.Testing.Recorded<T> left, Microsoft.Reactive.Testing.Recorded<T> right) { }
  69. }
  70. [System.Diagnostics.DebuggerDisplay("({Subscribe}, {Unsubscribe})")]
  71. [System.Serializable]
  72. public readonly struct Subscription : System.IEquatable<Microsoft.Reactive.Testing.Subscription>
  73. {
  74. public const long Infinite = 9223372036854775807;
  75. public Subscription(long subscribe) { }
  76. public Subscription(long subscribe, long unsubscribe) { }
  77. public long Subscribe { get; }
  78. public long Unsubscribe { get; }
  79. public bool Equals(Microsoft.Reactive.Testing.Subscription other) { }
  80. public override bool Equals(object obj) { }
  81. public override int GetHashCode() { }
  82. public override string ToString() { }
  83. public static bool operator !=(Microsoft.Reactive.Testing.Subscription left, Microsoft.Reactive.Testing.Subscription right) { }
  84. public static bool operator ==(Microsoft.Reactive.Testing.Subscription left, Microsoft.Reactive.Testing.Subscription right) { }
  85. }
  86. [System.Diagnostics.DebuggerDisplay("\\{ Clock = {Clock} Now = {Now.ToString(\"O\")} \\}")]
  87. public class TestScheduler : System.Reactive.Concurrency.VirtualTimeScheduler<long, long>
  88. {
  89. public TestScheduler() { }
  90. protected override long Add(long absolute, long relative) { }
  91. public Microsoft.Reactive.Testing.ITestableObservable<T> CreateColdObservable<T>(params Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>>[] messages) { }
  92. public Microsoft.Reactive.Testing.ITestableObservable<T> CreateHotObservable<T>(params Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>>[] messages) { }
  93. public Microsoft.Reactive.Testing.ITestableObserver<T> CreateObserver<T>() { }
  94. public override System.IDisposable ScheduleAbsolute<TState>(TState state, long dueTime, System.Func<System.Reactive.Concurrency.IScheduler, TState, System.IDisposable> action) { }
  95. public Microsoft.Reactive.Testing.ITestableObserver<T> Start<T>(System.Func<System.IObservable<T>> create) { }
  96. public Microsoft.Reactive.Testing.ITestableObserver<T> Start<T>(System.Func<System.IObservable<T>> create, long disposed) { }
  97. public Microsoft.Reactive.Testing.ITestableObserver<T> Start<T>(System.Func<System.IObservable<T>> create, long created, long subscribed, long disposed) { }
  98. protected override System.DateTimeOffset ToDateTimeOffset(long absolute) { }
  99. protected override long ToRelative(System.TimeSpan timeSpan) { }
  100. }
  101. }