Exemplo n.º 1
0
        public void RemoveNoteTest()
        {
            Notes notes = new Notes(false);

            notes.AddNoteDefaultSettings("test note", 1, 10, 10, 200, 300, "test", true);
            int notelastpos = notes.CountNotes;

            notes.RemoveNote(notelastpos - 1);
            int exceptedcountnotesnow = notelastpos - 1;

            if (notes.CountNotes != exceptedcountnotesnow)
            {
                Assert.Fail("Number of notes: " + notes.CountNotes + ", different then excepted: " + exceptedcountnotesnow);
            }
        }
Exemplo n.º 2
0
        public void AddNoteDefaultSettingsTest()
        {
            Notes  target   = new Notes(false);
            string title    = "123456789abc";
            int    skinnr   = 0;
            int    x        = 400;
            int    y        = 300;
            int    width    = 200;
            int    height   = 100;
            string content  = "some content";
            bool   wordwarp = true;

            target.AddNoteDefaultSettings(title, skinnr, x, y, width, height, content, wordwarp);
            Note actualnote = target.GetNote(target.CountNotes - 1);

            Assert.IsNotNull(actualnote, "CreateNoteTest failed to create Note object.");
            Assert.AreEqual(title, actualnote.Title, "Note title not good.");
            Assert.AreEqual(x, actualnote.X, "Wrong X coordinates");
            Assert.AreEqual(y, actualnote.Y, "Wrong Y coordinates");
            Assert.AreEqual(width, actualnote.Width, "Wrong width size");
            Assert.AreEqual(height, actualnote.Height, "Wrong height size");
            Assert.AreEqual(wordwarp, actualnote.Wordwarp, "Note wordwarp differs.");
        }