UnitTest.cs 742 B

123456789101112131415161718192021222324252627
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the Apache 2.0 License.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Reactive;
  5. using Xunit;
  6. namespace ReactiveTests.Tests
  7. {
  8. public class UnitTest
  9. {
  10. [Fact]
  11. public void Unit()
  12. {
  13. var u1 = new Unit();
  14. var u2 = new Unit();
  15. Assert.True(u1.Equals(u2));
  16. Assert.False(u1.Equals(""));
  17. Assert.False(u1.Equals(null));
  18. Assert.True(u1 == u2);
  19. Assert.False(u1 != u2);
  20. Assert.Equal(0, u1.GetHashCode());
  21. Assert.Equal("()", u1.ToString());
  22. }
  23. }
  24. }