| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 | 
							- // Licensed to the .NET Foundation under one or more agreements.
 
- // The .NET Foundation licenses this file to you under the MIT License.
 
- // See the LICENSE file in the project root for more information.
 
- #if SIGNED
 
- using System.Linq;
 
- using System.Reactive;
 
- using Microsoft.VisualStudio.TestTools.UnitTesting;
 
- #endif
 
- using Assert = Xunit.Assert;
 
- namespace ReactiveTests.Tests
 
- {
 
- #if SIGNED
 
-     [TestClass]
 
-     public class ImmutableListTest
 
-     {
 
-         [TestMethod]
 
-         public void ImmutableList_Basics()
 
-         {
 
-             var list = ImmutableList<int>.Empty;
 
-             Assert.True(list.Data.SequenceEqual(new int[] { }));
 
-             list = list.Add(42);
 
-             Assert.True(list.Data.SequenceEqual(new int[] { 42 }));
 
-             list = list.Remove(42);
 
-             Assert.True(list.Data.SequenceEqual(new int[] { }));
 
-             list = list.Remove(42);
 
-             Assert.True(list.Data.SequenceEqual(new int[] { }));
 
-             list = list.Add(43);
 
-             list = list.Add(44);
 
-             list = list.Add(43);
 
-             Assert.True(list.Data.SequenceEqual(new int[] { 43, 44, 43 }));
 
-             list = list.Remove(43);
 
-             Assert.True(list.Data.SequenceEqual(new int[] { 44, 43 }));
 
-             list = list.Remove(43);
 
-             Assert.True(list.Data.SequenceEqual(new int[] { 44 }));
 
-             list = list.Remove(44);
 
-             Assert.True(list.Data.SequenceEqual(new int[] { }));
 
-         }
 
-         [TestMethod]
 
-         public void ImmutableList_Nulls()
 
-         {
 
-             var list = ImmutableList<string>.Empty;
 
-             Assert.True(list.Data.SequenceEqual(new string[] { }));
 
-             list = list.Add(null);
 
-             Assert.True(list.Data.SequenceEqual(new string[] { null }));
 
-             list = list.Remove(null);
 
-             Assert.True(list.Data.SequenceEqual(new string[] { }));
 
-         }
 
-     }
 
- #endif
 
- }
 
 
  |