예제 #1
0
        public void NoteClass_ToFootnoteDisplayModelMethod_ReturnsFootnoteDisplayModelWithCorrectDisplayOnPagesProperty()
        {
            Note testObject = NoteHelpers.GetNote();

            FootnoteDisplayModel testOutput = testObject.ToFootnoteDisplayModel();

            Assert.AreEqual(testObject.DefinedOnPages, testOutput.DisplayOnPage);
        }
예제 #2
0
        public void NoteClass_ToFootnoteDisplayModelMethod_ReturnsFootnoteDisplayModelWithCorrectSymbolProperty()
        {
            Note testObject = NoteHelpers.GetNote();

            FootnoteDisplayModel testOutput = testObject.ToFootnoteDisplayModel();

            Assert.AreEqual(testObject.Symbol, testOutput.Symbol);
        }
예제 #3
0
        public void NoteClass_CopyToMethod_ThrowsArgumentNullException_IfParameterIsNull()
        {
            Note testObject = NoteHelpers.GetNote();

            testObject.CopyTo(null);

            Assert.Fail();
        }
 private Note[] GetTestNotes(IList <string> noteIds)
 {
     Note[] notes = new Note[noteIds.Count];
     for (int i = 0; i < noteIds.Count; ++i)
     {
         Note note = NoteHelpers.GetNote();
         note.Id  = noteIds[i];
         notes[i] = note;
     }
     return(notes);
 }
예제 #5
0
        public void NoteClass_CopyToMethod_ThrowsArgumentNullExceptionWithCorrectParamNameProperty_IfParameterIsNull()
        {
            Note testObject = NoteHelpers.GetNote();

            try
            {
                testObject.CopyTo(null);
                Assert.Fail();
            }
            catch (ArgumentNullException ex)
            {
                Assert.AreEqual("target", ex.ParamName);
            }
        }