Exemplo n.º 1
0
    public void TestOverlappingLinebreakThrowsException()
    {
        ms.Add(new Note(ENoteType.Normal, 0, 2, 0, ""));
        VoicesBuilderException vbe = Assert.Throws <VoicesBuilderException>(delegate { ms.SetLinebreakBeat(1); });

        Assert.AreEqual("Linebreak conflicts with existing sentence", vbe.Message);
    }
Exemplo n.º 2
0
    public void TestOverlappingNoteThrowsException()
    {
        ms.Add(new Note(ENoteType.Normal, 0, 2, 0, ""));
        VoicesBuilderException vbe = Assert.Throws <VoicesBuilderException>(delegate { ms.Add(new Note(ENoteType.Normal, 1, 1, 0, "")); });

        Assert.AreEqual("New note overlaps with existing sentence", vbe.Message);
    }
Exemplo n.º 3
0
    public void TestAddingNotesAfterLinebreakBeatThrowsException()
    {
        ms.SetLinebreakBeat(2);
        VoicesBuilderException vbe = Assert.Throws <VoicesBuilderException>(delegate { ms.Add(new Note(ENoteType.Normal, 0, 1, 0, "")); });

        Assert.AreEqual("Adding more notes after the linebreak has already been set is not allowed", vbe.Message);
    }
Exemplo n.º 4
0
    public void TestOverlappingSentenceThrowsException()
    {
        MutableSentence ms = new MutableSentence();

        ms.Add(new Note(ENoteType.Normal, 0, 2, 0, ""));
        mv.Add((Sentence)ms);

        MutableSentence ms2 = new MutableSentence();

        ms2.Add(new Note(ENoteType.Normal, 1, 2, 0, ""));

        VoicesBuilderException vbe = Assert.Throws <VoicesBuilderException>(delegate { mv.Add((Sentence)ms2); });

        Assert.AreEqual("Sentence starts before previous sentence is over", vbe.Message);
    }
Exemplo n.º 5
0
    public void TestInterferingLinebreakThrowsException()
    {
        MutableSentence ms = new MutableSentence();

        ms.Add(new Note(ENoteType.Normal, 0, 2, 0, ""));
        ms.SetLinebreakBeat(5);
        mv.Add((Sentence)ms);

        MutableSentence ms2 = new MutableSentence();

        ms2.Add(new Note(ENoteType.Normal, 4, 2, 0, ""));

        VoicesBuilderException vbe = Assert.Throws <VoicesBuilderException>(delegate { mv.Add((Sentence)ms2); });

        Assert.AreEqual("Sentence conflicts with linebreak of previous sentence", vbe.Message);
    }