ApiApprovalTests.Testing.approved.cs 6.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. [assembly: System.CLSCompliantAttribute(true)]
  2. [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
  3. [assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".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 class static 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.Collections.Generic.IEnumerable<T> expected, System.Collections.Generic.IEnumerable<T> actual, string message) { }
  19. public static void AreElementsEqual<T>(System.IObservable<T> expected, System.IObservable<T> actual) { }
  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, T value) { }
  46. public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnNext<T>(long ticks, System.Func<T, bool> predicate) { }
  47. public static Microsoft.Reactive.Testing.Subscription Subscribe(long start, long end) { }
  48. public static Microsoft.Reactive.Testing.Subscription Subscribe(long start) { }
  49. }
  50. [System.Diagnostics.DebuggerDisplayAttribute("{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. }
  61. [System.Diagnostics.DebuggerDisplayAttribute("({Subscribe}, {Unsubscribe})")]
  62. public struct Subscription : System.IEquatable<Microsoft.Reactive.Testing.Subscription>
  63. {
  64. public const long Infinite = 9223372036854775807;
  65. public Subscription(long subscribe) { }
  66. public Subscription(long subscribe, long unsubscribe) { }
  67. public long Subscribe { get; }
  68. public long Unsubscribe { get; }
  69. public bool Equals(Microsoft.Reactive.Testing.Subscription other) { }
  70. public override bool Equals(object obj) { }
  71. public override int GetHashCode() { }
  72. public override string ToString() { }
  73. }
  74. [System.Diagnostics.DebuggerDisplayAttribute("\\{ Clock = {Clock} Now = {Now.ToString(\"O\")} \\}")]
  75. public class TestScheduler : System.Reactive.Concurrency.VirtualTimeScheduler<long, long>
  76. {
  77. public TestScheduler() { }
  78. protected override long Add(long absolute, long relative) { }
  79. public Microsoft.Reactive.Testing.ITestableObservable<T> CreateColdObservable<T>(params Microsoft.Reactive.Testing.Recorded<>[] messages) { }
  80. public Microsoft.Reactive.Testing.ITestableObservable<T> CreateHotObservable<T>(params Microsoft.Reactive.Testing.Recorded<>[] messages) { }
  81. public Microsoft.Reactive.Testing.ITestableObserver<T> CreateObserver<T>() { }
  82. public override System.IDisposable ScheduleAbsolute<TState>(TState state, long dueTime, System.Func<System.Reactive.Concurrency.IScheduler, TState, System.IDisposable> action) { }
  83. public Microsoft.Reactive.Testing.ITestableObserver<T> Start<T>(System.Func<System.IObservable<T>> create, long created, long subscribed, long disposed) { }
  84. public Microsoft.Reactive.Testing.ITestableObserver<T> Start<T>(System.Func<System.IObservable<T>> create, long disposed) { }
  85. public Microsoft.Reactive.Testing.ITestableObserver<T> Start<T>(System.Func<System.IObservable<T>> create) { }
  86. protected override System.DateTimeOffset ToDateTimeOffset(long absolute) { }
  87. protected override long ToRelative(System.TimeSpan timeSpan) { }
  88. }
  89. }