Tests.Api.ApiApprovalTests.Testing.verified.cs 6.9 KB

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