示例#1
0
        public void DocumentSetUnionTwoIdenticalSetsTest()
        {
            var docSet1 = new DocumentSet(new HashSet <Document> {
                new Document("doc1")
            });

            Assert.Equal(docSet1, DocumentSet.Union(new DocumentSet[] { docSet1, docSet1 }));
        }
示例#2
0
        public void DocumentSetUnionTwoSetsTest()
        {
            var docSet1 = new DocumentSet(new HashSet <Document>
            {
                new Document("doc1")
            }
                                          );
            var docSet2 = new DocumentSet(new HashSet <Document>
            {
                new Document("doc2")
            }
                                          );
            var expected = new DocumentSet(new HashSet <Document>
            {
                new Document("doc1"), new Document("doc2")
            }
                                           );

            Assert.Equal(expected, DocumentSet.Union(new DocumentSet[] { docSet1, docSet2 }));
        }
示例#3
0
 public void DocumentSetUnionWithNullTest()
 {
     Assert.Throws <ArgumentNullException>(() => DocumentSet.Union(null));
 }