UnitTest.cs 825 B

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