public void Constructor_VariousCollections_Success(string[] expected, ICollection items) { var collection = new ServiceNameCollection(items); Assert.Equal(expected, collection.Cast <string>()); Assert.Equal(expected.Length, collection.Count); }
public void Merge_VariousEnumerables_Success(string[] expected, IEnumerable serviceNames) { var collection = new ServiceNameCollection(new[] { "first", "second" }); ServiceNameCollection merged = collection.Merge(serviceNames); Assert.Equal(expected, merged.Cast <string>()); Assert.Equal(expected.Length, merged.Count); }
public void Merge_NonDuplicateString_Succeeds() { string[] expected = new[] { "first", "second", "third" }; var collection = new ServiceNameCollection(new[] { "first", "second" }); ServiceNameCollection merged = collection.Merge("third"); Assert.Equal(expected, merged.Cast <string>()); }
public void Merge_DuplicateString_DuplicateFiltered(string duplicate) { string[] expected = new[] { "first", "second" }; var collection = new ServiceNameCollection(new[] { "first", "second" }); ServiceNameCollection merged = collection.Merge(duplicate); Assert.Equal(expected, merged.Cast <string>()); }
public void Constructor_VariousCollections_Success(string[] expected, ICollection items) { var collection = new ServiceNameCollection(items); Assert.Equal(expected, collection.Cast<string>()); Assert.Equal(expected.Length, collection.Count); }