コード例 #1
0
 /// <summary>
 /// Determines whether two <see cref="DumpedDocument" />s are equal.
 /// </summary>
 /// <param name="d1">The first document.</param>
 /// <param name="d2">The second document.</param>
 /// <returns><c>true</c> if the documents are equal, <c>false</c> otherwise.</returns>
 private static bool EqualDumpedDocument(DumpedDocument d1, DumpedDocument d2)
 {
     // Only consider ID, Name and TypeTag
     //return d1.ID == d2.ID && d1.Name == d2.Name && d1.Title == d2.Title &&
     //	d1.TypeTag == d2.TypeTag && d1.DateTime == d2.DateTime;
     return(d1.ID == d2.ID && d1.Name == d2.Name && d1.TypeTag == d2.TypeTag);
 }
コード例 #2
0
        public void InitializeData_DocumentNotAvailable()
        {
            IInMemoryIndex index = (IInMemoryIndex)GetIndex();

            IDocument doc        = MockDocument("doc", "Document", "doc", DateTime.Now);
            IDocument inexistent = MockDocument2("inexistent", "Inexistent", "doc", DateTime.Now);

            DumpedDocument[] documents = new DumpedDocument[] {
                new DumpedDocument(doc),
                new DumpedDocument(inexistent)
            };

            DumpedWord[] words = new DumpedWord[] {
                new DumpedWord(new Word(1, "document")),
                new DumpedWord(new Word(2, "this")),
                new DumpedWord(new Word(3, "is")),
                new DumpedWord(new Word(4, "some")),
                new DumpedWord(new Word(5, "content")),

                new DumpedWord(new Word(6, "inexistent")),
                new DumpedWord(new Word(7, "dummy")),
                new DumpedWord(new Word(8, "text")),
                new DumpedWord(new Word(9, "used")),
                new DumpedWord(new Word(10, "for")),
                new DumpedWord(new Word(11, "testing")),
                new DumpedWord(new Word(12, "purposes"))
            };

            DumpedWordMapping[] mappings = new DumpedWordMapping[] {
                new DumpedWordMapping(words[0].ID, documents[0].ID, new BasicWordInfo(0, 0, WordLocation.Title)),
                new DumpedWordMapping(words[1].ID, documents[0].ID, new BasicWordInfo(0, 0, WordLocation.Content)),
                new DumpedWordMapping(words[2].ID, documents[0].ID, new BasicWordInfo(5, 1, WordLocation.Content)),
                new DumpedWordMapping(words[3].ID, documents[0].ID, new BasicWordInfo(8, 2, WordLocation.Content)),
                new DumpedWordMapping(words[4].ID, documents[0].ID, new BasicWordInfo(13, 3, WordLocation.Content)),

                new DumpedWordMapping(words[5].ID, documents[1].ID, new BasicWordInfo(0, 0, WordLocation.Title)),
                new DumpedWordMapping(words[6].ID, documents[1].ID, new BasicWordInfo(0, 0, WordLocation.Content)),
                new DumpedWordMapping(words[7].ID, documents[1].ID, new BasicWordInfo(6, 1, WordLocation.Content)),
                new DumpedWordMapping(words[8].ID, documents[1].ID, new BasicWordInfo(11, 2, WordLocation.Content)),
                new DumpedWordMapping(words[9].ID, documents[1].ID, new BasicWordInfo(16, 3, WordLocation.Content)),
                new DumpedWordMapping(words[10].ID, documents[1].ID, new BasicWordInfo(20, 4, WordLocation.Content)),
                new DumpedWordMapping(words[11].ID, documents[1].ID, new BasicWordInfo(28, 5, WordLocation.Content))
            };

            index.SetBuildDocumentDelegate(delegate(DumpedDocument d) {
                if (d.Name == "doc")
                {
                    return(doc);
                }
                else
                {
                    return(null);
                }
            });

            index.InitializeData(documents, words, mappings);

            Assert.AreEqual(1, index.Search(new SearchParameters("this")).Count, "Wrong result count");
            Assert.AreEqual(0, index.Search(new SearchParameters("dummy")).Count, "Wrong result count");
        }
コード例 #3
0
 /// <summary>
 /// Writes a <see cref="DumpedDocument" /> to a <see cref="BinaryWriter" />.
 /// </summary>
 /// <param name="writer">The <see cref="BinaryWriter" />.</param>
 /// <param name="document">The <see cref="DumpedDocument" />.</param>
 private static void WriteDumpedDocument(BinaryWriter writer, DumpedDocument document)
 {
     writer.Write(document.ID);
     writer.Write(document.Name);
     writer.Write(document.Title);
     writer.Write(document.TypeTag);
     writer.Write(document.DateTime.ToBinary( ));
 }
コード例 #4
0
        public void Constructor_WithDocument()
        {
            IDocument      doc  = MockDocument("name", "Title", "doc", DateTime.Now);
            DumpedDocument ddoc = new DumpedDocument(doc);

            Assert.AreEqual(doc.ID, ddoc.ID, "Wrong ID");
            Assert.AreEqual("name", ddoc.Name, "Wrong name");
            Assert.AreEqual("Title", ddoc.Title, "Wrong title");
            Assert.AreEqual(doc.DateTime, ddoc.DateTime, "Wrong date/time");
        }
コード例 #5
0
        public void Constructor_WithDocument()
        {
            IDocument      doc  = MockDocument("name", "Title", "doc", DateTime.Now);
            DumpedDocument ddoc = new DumpedDocument(doc);

            Assert.Equal(doc.ID, ddoc.ID);
            Assert.Equal("name", ddoc.Name);
            Assert.Equal("Title", ddoc.Title);
            Assert.Equal(doc.DateTime, ddoc.DateTime);
        }
コード例 #6
0
ファイル: FileDocument.cs プロジェクト: wheeliemow/wiki
        /// <summary>
        /// Initializes a new instance of the <see cref="T:FileDocument" /> class.
        /// </summary>
        /// <param name="doc">The dumped document.</param>
        public FileDocument(DumpedDocument doc)
        {
            string[] fields = doc.Name.Split('|');

            ID       = doc.ID;
            Name     = doc.Name;
            Title    = doc.Title;
            DateTime = doc.DateTime;
            Provider = fields[0];
        }
コード例 #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:FileDocument" /> class.
        /// </summary>
        /// <param name="doc">The dumped document.</param>
        public FileDocument(DumpedDocument doc)
        {
            string[] fields = doc.Name.Split('|');

            id       = doc.ID;
            name     = doc.Name;
            title    = doc.Title;
            dateTime = doc.DateTime;
            provider = fields[0];
        }
コード例 #8
0
        public void Constructor_WithParameters()
        {
            IDocument doc = MockDocument("name", "Title", "doc", DateTime.Now);
            DumpedDocument ddoc = new DumpedDocument(doc.ID, doc.Name, doc.Title, doc.TypeTag, doc.DateTime);

            Assert.AreEqual(doc.ID, ddoc.ID, "Wrong ID");
            Assert.AreEqual("name", ddoc.Name, "Wrong name");
            Assert.AreEqual("Title", ddoc.Title, "Wrong title");
            Assert.AreEqual(doc.DateTime, ddoc.DateTime, "Wrong date/time");
        }
コード例 #9
0
        public void Constructor_WithParameters()
        {
            var doc  = MockDocument("name", "Title", "doc", DateTime.Now);
            var ddoc = new DumpedDocument(doc.ID, doc.Name, doc.Title, doc.TypeTag, doc.DateTime);

            Assert.AreEqual(doc.ID, ddoc.ID, "Wrong ID");
            Assert.AreEqual("name", ddoc.Name, "Wrong name");
            Assert.AreEqual("Title", ddoc.Title, "Wrong title");
            Assert.AreEqual(doc.DateTime, ddoc.DateTime, "Wrong date/time");
        }
コード例 #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:PageAttachmentDocument" /> class.
        /// </summary>
        /// <param name="doc">The dumped document.</param>
        public PageAttachmentDocument(DumpedDocument doc)
        {
            string[] fields = doc.Name.Split('|');

            id       = doc.ID;
            name     = doc.Name;
            title    = doc.Title;
            dateTime = doc.DateTime;
            provider = fields[0];
            page     = Pages.FindPage(fields[1]);
        }
コード例 #11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:PageAttachmentDocument" /> class.
        /// </summary>
        /// <param name="doc">The dumped document.</param>
        public PageAttachmentDocument(DumpedDocument doc)
        {
            string[] fields = doc.Name.Split('|');

            ID       = doc.ID;
            Name     = doc.Name;
            Title    = doc.Title;
            DateTime = doc.DateTime;
            Provider = fields[0];
            Page     = Pages.FindPage(fields[1]);
        }
コード例 #12
0
ファイル: SearchTools.cs プロジェクト: wheeliemow/wiki
 /// <summary>
 /// Detects the document in a dumped instance for files and attachments.
 /// </summary>
 /// <param name="doc">The dumped document instance.</param>
 /// <returns>The proper document instance.</returns>
 private static IDocument DetectFileOrAttachment(DumpedDocument doc)
 {
     if (doc.TypeTag == FileDocument.StandardTypeTag)
     {
         return(new FileDocument(doc));
     }
     if (doc.TypeTag == PageAttachmentDocument.StandardTypeTag)
     {
         return(new PageAttachmentDocument(doc));
     }
     throw new NotSupportedException( );
 }
コード例 #13
0
        public void InitializeData_DocumentNotAvailable()
        {
            IInMemoryIndex index = (IInMemoryIndex)GetIndex();

            IDocument doc = MockDocument("doc", "Document", "doc", DateTime.Now);
            IDocument inexistent = MockDocument2("inexistent", "Inexistent", "doc", DateTime.Now);

            DumpedDocument[] documents = new DumpedDocument[] {
                new DumpedDocument(doc),
                new DumpedDocument(inexistent) };

            DumpedWord[] words = new DumpedWord[] {
                new DumpedWord(new Word(1, "document")),
                new DumpedWord(new Word(2, "this")),
                new DumpedWord(new Word(3, "is")),
                new DumpedWord(new Word(4, "some")),
                new DumpedWord(new Word(5, "content")),

                new DumpedWord(new Word(6, "inexistent")),
                new DumpedWord(new Word(7, "dummy")),
                new DumpedWord(new Word(8, "text")),
                new DumpedWord(new Word(9, "used")),
                new DumpedWord(new Word(10, "for")),
                new DumpedWord(new Word(11, "testing")),
                new DumpedWord(new Word(12, "purposes")) };

            DumpedWordMapping[] mappings = new DumpedWordMapping[] {
                new DumpedWordMapping(words[0].ID, documents[0].ID, new BasicWordInfo(0, 0, WordLocation.Title)),
                new DumpedWordMapping(words[1].ID, documents[0].ID, new BasicWordInfo(0, 0, WordLocation.Content)),
                new DumpedWordMapping(words[2].ID, documents[0].ID, new BasicWordInfo(5, 1, WordLocation.Content)),
                new DumpedWordMapping(words[3].ID, documents[0].ID, new BasicWordInfo(8, 2, WordLocation.Content)),
                new DumpedWordMapping(words[4].ID, documents[0].ID, new BasicWordInfo(13, 3, WordLocation.Content)),

                new DumpedWordMapping(words[5].ID, documents[1].ID, new BasicWordInfo(0, 0, WordLocation.Title)),
                new DumpedWordMapping(words[6].ID, documents[1].ID, new BasicWordInfo(0, 0, WordLocation.Content)),
                new DumpedWordMapping(words[7].ID, documents[1].ID, new BasicWordInfo(6, 1, WordLocation.Content)),
                new DumpedWordMapping(words[8].ID, documents[1].ID, new BasicWordInfo(11, 2, WordLocation.Content)),
                new DumpedWordMapping(words[9].ID, documents[1].ID, new BasicWordInfo(16, 3, WordLocation.Content)),
                new DumpedWordMapping(words[10].ID, documents[1].ID, new BasicWordInfo(20, 4, WordLocation.Content)),
                new DumpedWordMapping(words[11].ID, documents[1].ID, new BasicWordInfo(28, 5, WordLocation.Content)) };

            index.SetBuildDocumentDelegate(delegate(DumpedDocument d) {
                if(d.Name == "doc") return doc;
                else return null;
            });

            index.InitializeData(documents, words, mappings);

            Assert.AreEqual(1, index.Search(new SearchParameters("this")).Count, "Wrong result count");
            Assert.AreEqual(0, index.Search(new SearchParameters("dummy")).Count, "Wrong result count");
        }
コード例 #14
0
        /// <summary>
        /// Loads the index from the data store the first time.
        /// </summary>
        /// <param name="documents">The dumped documents.</param>
        /// <param name="words">The dumped words.</param>
        /// <param name="mappings">The dumped word mappings.</param>
        protected override void LoadIndexInternal(out DumpedDocument[] documents, out DumpedWord[] words, out DumpedWordMapping[] mappings)
        {
            uint maxDocumentId = 0;
            uint maxWordId     = 0;

            // 1. Load Documents
            using (FileStream fs = new FileStream(_documentsFile, FileMode.Open, FileAccess.Read, FileShare.None))
            {
                int          count  = ReadCount(fs);
                BinaryReader reader = new BinaryReader(fs, Encoding.UTF8);
                documents = new DumpedDocument[count];
                for (int i = 0; i < count; i++)
                {
                    documents[i] = ReadDumpedDocument(reader);
                    if (documents[i].ID > maxDocumentId)
                    {
                        maxDocumentId = documents[i].ID;
                    }
                }
                _firstFreeDocumentId = maxDocumentId + 1;
            }

            // 2. Load Words
            using (FileStream fs = new FileStream(_wordsFile, FileMode.Open, FileAccess.Read, FileShare.None))
            {
                int          count  = ReadCount(fs);
                BinaryReader reader = new BinaryReader(fs, Encoding.UTF8);
                words = new DumpedWord[count];
                for (int i = 0; i < count; i++)
                {
                    words[i] = ReadDumpedWord(reader);
                    if (words[i].ID > maxWordId)
                    {
                        maxWordId = words[i].ID;
                    }
                }
                _firstFreeWordId = maxWordId + 1;
            }

            // 3. Load Mappings
            using (FileStream fs = new FileStream(_mappingsFile, FileMode.Open, FileAccess.Read, FileShare.None))
            {
                int          count  = ReadCount(fs);
                BinaryReader reader = new BinaryReader(fs, Encoding.UTF8);
                mappings = new DumpedWordMapping[count];
                for (int i = 0; i < count; i++)
                {
                    mappings[i] = ReadDumpedWordMapping(reader);
                }
            }
        }
コード例 #15
0
ファイル: MessageDocument.cs プロジェクト: ahmedfe/TurnScrew
 /// <summary>
 /// Initializes a new instance of the <see cref="T:MessageDocument" /> class.
 /// </summary>
 /// <param name="pageInfo">The page.</param>
 /// <param name="messageID">The message ID.</param>
 /// <param name="dumpedDocument">The dumped document data.</param>
 /// <param name="tokenizer">The tokenizer.</param>
 public MessageDocument(PageInfo pageInfo, int messageID, DumpedDocument dumpedDocument, Tokenizer tokenizer)
 {
     if (dumpedDocument == null)
     {
         throw new ArgumentNullException(nameof(dumpedDocument));
     }
     PageInfo   = pageInfo;
     MessageID  = messageID;
     ID         = dumpedDocument.ID;
     Name       = dumpedDocument.Name;
     TypeTag    = dumpedDocument.TypeTag;
     Title      = dumpedDocument.Title;
     DateTime   = dumpedDocument.DateTime;
     _tokenizer = tokenizer ?? throw new ArgumentNullException(nameof(tokenizer));
 }
コード例 #16
0
        public void InitializeData()
        {
            IInMemoryIndex index = (IInMemoryIndex)GetIndex();

            IDocument d = MockDocument("doc", "Document", "doc", DateTime.Now);

            DumpedDocument[] documents = new DumpedDocument[] { new DumpedDocument(d) };

            DumpedWord[] words = new DumpedWord[] {
                new DumpedWord(new Word(1, "document")),
                new DumpedWord(new Word(2, "this")),
                new DumpedWord(new Word(3, "is")),
                new DumpedWord(new Word(4, "some")),
                new DumpedWord(new Word(5, "content"))
            };

            DumpedWordMapping[] mappings = new DumpedWordMapping[] {
                new DumpedWordMapping(words[0].ID, documents[0].ID, new BasicWordInfo(0, 0, WordLocation.Title)),
                new DumpedWordMapping(words[1].ID, documents[0].ID, new BasicWordInfo(0, 0, WordLocation.Content)),
                new DumpedWordMapping(words[2].ID, documents[0].ID, new BasicWordInfo(5, 1, WordLocation.Content)),
                new DumpedWordMapping(words[3].ID, documents[0].ID, new BasicWordInfo(8, 2, WordLocation.Content)),
                new DumpedWordMapping(words[4].ID, documents[0].ID, new BasicWordInfo(13, 3, WordLocation.Content))
            };

            index.SetBuildDocumentDelegate(delegate(DumpedDocument doc) { return(d); });

            index.InitializeData(documents, words, mappings);

            Assert.AreEqual(1, index.TotalDocuments, "Wrong document count");
            Assert.AreEqual(5, index.TotalWords, "Wrong word count");
            Assert.AreEqual(5, index.TotalOccurrences, "Wrong occurrence count");

            SearchResultCollection res = index.Search(new SearchParameters("document content"));

            Assert.AreEqual(1, res.Count, "Wrong result count");
            Assert.AreEqual(2, res[0].Matches.Count, "Wrong matches count");

            Assert.AreEqual("document", res[0].Matches[0].Text, "Wrong match text");
            Assert.AreEqual(0, res[0].Matches[0].FirstCharIndex, "Wrong match first char index");
            Assert.AreEqual(0, res[0].Matches[0].WordIndex, "Wrong match word index");
            Assert.AreEqual(WordLocation.Title, res[0].Matches[0].Location, "Wrong match location");

            Assert.AreEqual("content", res[0].Matches[1].Text, "Wrong match text");
            Assert.AreEqual(13, res[0].Matches[1].FirstCharIndex, "Wrong match first char index");
            Assert.AreEqual(3, res[0].Matches[1].WordIndex, "Wrong match word index");
            Assert.AreEqual(WordLocation.Content, res[0].Matches[1].Location, "Wrong match location");
        }
コード例 #17
0
        public void InitializeData()
        {
            IInMemoryIndex sut = (IInMemoryIndex)GetIndex();

            IDocument d = MockDocument("doc", "Document", "doc", DateTime.Now);

            DumpedDocument[] documents = new DumpedDocument[] { new DumpedDocument(d) };

            DumpedWord[] words = new DumpedWord[] {
                new DumpedWord(new Word(1, "document")),
                new DumpedWord(new Word(2, "this")),
                new DumpedWord(new Word(3, "is")),
                new DumpedWord(new Word(4, "some")),
                new DumpedWord(new Word(5, "content"))
            };

            DumpedWordMapping[] mappings = new DumpedWordMapping[] {
                new DumpedWordMapping(words[0].ID, documents[0].ID, new BasicWordInfo(0, 0, WordLocation.Title)),
                new DumpedWordMapping(words[1].ID, documents[0].ID, new BasicWordInfo(0, 0, WordLocation.Content)),
                new DumpedWordMapping(words[2].ID, documents[0].ID, new BasicWordInfo(5, 1, WordLocation.Content)),
                new DumpedWordMapping(words[3].ID, documents[0].ID, new BasicWordInfo(8, 2, WordLocation.Content)),
                new DumpedWordMapping(words[4].ID, documents[0].ID, new BasicWordInfo(13, 3, WordLocation.Content))
            };

            sut.SetBuildDocumentDelegate(delegate(DumpedDocument doc) { return(d); });

            sut.InitializeData(documents, words, mappings);

            Assert.Equal(1, sut.TotalDocuments);
            Assert.Equal(5, sut.TotalWords);
            Assert.Equal(5, sut.TotalOccurrences);

            SearchResultCollection res = sut.Search(new SearchParameters("document content"));

            Assert.Single(res);
            Assert.Equal(2, res[0].Matches.Count);

            Assert.Equal("document", res[0].Matches[0].Text);
            Assert.Equal(0, res[0].Matches[0].FirstCharIndex);
            Assert.Equal(0, res[0].Matches[0].WordIndex);
            Assert.Equal(WordLocation.Title, res[0].Matches[0].Location);

            Assert.Equal("content", res[0].Matches[1].Text);
            Assert.Equal(13, res[0].Matches[1].FirstCharIndex);
            Assert.Equal(3, res[0].Matches[1].WordIndex);
            Assert.Equal(WordLocation.Content, res[0].Matches[1].Location);
        }
コード例 #18
0
        public void InitializeData()
        {
            IInMemoryIndex index = (IInMemoryIndex)GetIndex();

            IDocument d = MockDocument("doc", "Document", "doc", DateTime.Now);
            DumpedDocument[] documents = new DumpedDocument[] { new DumpedDocument(d) };

            DumpedWord[] words = new DumpedWord[] {
                new DumpedWord(new Word(1, "document")),
                new DumpedWord(new Word(2, "this")),
                new DumpedWord(new Word(3, "is")),
                new DumpedWord(new Word(4, "some")),
                new DumpedWord(new Word(5, "content")) };

            DumpedWordMapping[] mappings = new DumpedWordMapping[] {
                new DumpedWordMapping(words[0].ID, documents[0].ID, new BasicWordInfo(0, 0, WordLocation.Title)),
                new DumpedWordMapping(words[1].ID, documents[0].ID, new BasicWordInfo(0, 0, WordLocation.Content)),
                new DumpedWordMapping(words[2].ID, documents[0].ID, new BasicWordInfo(5, 1, WordLocation.Content)),
                new DumpedWordMapping(words[3].ID, documents[0].ID, new BasicWordInfo(8, 2, WordLocation.Content)),
                new DumpedWordMapping(words[4].ID, documents[0].ID, new BasicWordInfo(13, 3, WordLocation.Content)) };

            index.SetBuildDocumentDelegate(delegate(DumpedDocument doc) { return d; });

            index.InitializeData(documents, words, mappings);

            Assert.AreEqual(1, index.TotalDocuments, "Wrong document count");
            Assert.AreEqual(5, index.TotalWords, "Wrong word count");
            Assert.AreEqual(5, index.TotalOccurrences, "Wrong occurrence count");

            SearchResultCollection res = index.Search(new SearchParameters("document content"));
            Assert.AreEqual(1, res.Count, "Wrong result count");
            Assert.AreEqual(2, res[0].Matches.Count, "Wrong matches count");

            Assert.AreEqual("document", res[0].Matches[0].Text, "Wrong match text");
            Assert.AreEqual(0, res[0].Matches[0].FirstCharIndex, "Wrong match first char index");
            Assert.AreEqual(0, res[0].Matches[0].WordIndex, "Wrong match word index");
            Assert.AreEqual(WordLocation.Title, res[0].Matches[0].Location, "Wrong match location");

            Assert.AreEqual("content", res[0].Matches[1].Text, "Wrong match text");
            Assert.AreEqual(13, res[0].Matches[1].FirstCharIndex, "Wrong match first char index");
            Assert.AreEqual(3, res[0].Matches[1].WordIndex, "Wrong match word index");
            Assert.AreEqual(WordLocation.Content, res[0].Matches[1].Location, "Wrong match location");
        }
コード例 #19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:PageDocument" /> class.
        /// </summary>
        /// <param name="pageInfo">The page.</param>
        /// <param name="dumpedDocument">The dumped document data.</param>
        /// <param name="tokenizer">The tokenizer.</param>
        public PageDocument(PageInfo pageInfo, DumpedDocument dumpedDocument, Tokenizer tokenizer)
        {
            if (dumpedDocument == null)
            {
                throw new ArgumentNullException("dumpedDocument");
            }
            if (tokenizer == null)
            {
                throw new ArgumentNullException("tokenizer");
            }

            this.pageInfo  = pageInfo;
            id             = dumpedDocument.ID;
            name           = dumpedDocument.Name;
            typeTag        = dumpedDocument.TypeTag;
            title          = dumpedDocument.Title;
            dateTime       = dumpedDocument.DateTime;
            this.tokenizer = tokenizer;
        }
コード例 #20
0
 public void Constructor_WithDocument_NullDocument()
 {
     DumpedDocument ddoc = new DumpedDocument(null);
 }
コード例 #21
0
 public void Constructor_WithParameters_InvalidName(string name)
 {
     DumpedDocument ddoc = new DumpedDocument(10, name, "Title", "doc", DateTime.Now);
 }
コード例 #22
0
 public void Constructor_WithParameters_InvalidTitle(string title)
 {
     DumpedDocument ddoc = new DumpedDocument(1, "name", title, "doc", DateTime.Now);
 }
コード例 #23
0
 public void Constructor_WithParameters_InvalidTypeTag(string typeTag)
 {
     DumpedDocument ddoc = new DumpedDocument(1, "name", "Title", typeTag, DateTime.Now);
 }
コード例 #24
0
 public void Constructor_WithParameters_InvalidName(string name)
 {
     var ddoc = new DumpedDocument(10, name, "Title", "doc", DateTime.Now);
 }
コード例 #25
0
 public void Constructor_WithParameters_InvalidTitle(string title)
 {
     var ddoc = new DumpedDocument(1, "name", title, "doc", DateTime.Now);
 }
コード例 #26
0
 public void Constructor_WithParameters_InvalidTypeTag(string typeTag)
 {
     var ddoc = new DumpedDocument(1, "name", "Title", typeTag, DateTime.Now);
 }
コード例 #27
0
 public void Constructor_WithDocument_NullDocument()
 {
     DumpedDocument ddoc = new DumpedDocument(null);
 }