public void Cleanup()
        {
            clefobj = null;
            meiclef = null;

            barline    = null;
            meibarline = null;

            unclear = null;

            meicustos = null;
            custos    = null;
        }
        public void Init()
        {
            clefobj = new Model.Clef();
            meiclef = new mei.Clef();

            barline    = new Model.Barline();
            meibarline = new mei.BarLine();

            unclear = new mei.Unclear();

            meicustos = new mei.Custos();
            custos    = new Model.Custos();
        }
Exemplo n.º 3
0
        public void BuildSequence_checkConversion()
        {
            foreach (Sequence testSequence in testList)
            {
                foreach (ObjectInSequence obj in testSequence.ObjectsInSequence)
                {
                    Assert.AreNotEqual(obj.Evidence, Evidence.Invalid);

                    switch (obj.Type)
                    {
                    case ObjectType.Accidental:
                        Accidental accid = (Accidental)obj;
                        Assert.AreNotEqual(Model.AccidType.Null, accid.AccidentalType);
                        break;

                    case ObjectType.Barline:
                        Barline bl = (Barline)obj;
                        Assert.AreNotEqual(Model.BarlineType.Null, bl.BarlineType);
                        break;

                    case ObjectType.Clef:
                        Model.Clef clef = (Model.Clef)obj;
                        Assert.AreNotEqual(Model.Clefshape.Null, clef.Shape);
                        break;

                    case ObjectType.KeyAccidental:
                        KeyAccidental keyacc = (KeyAccidental)obj;
                        Assert.AreNotEqual(Model.AccidType.Null, keyacc.AccidentalType);
                        break;

                    case ObjectType.Mensur:
                        Model.Mensur mens = (Model.Mensur)obj;
                        Assert.AreNotEqual(0, mens.Tempus);
                        break;

                    case ObjectType.Note:
                        Model.Note note = (Model.Note)obj;
                        Assert.AreNotEqual(0, note.WrittenPitch);
                        Assert.AreNotEqual(Model.Duration.Null, note.Duration);
                        break;

                    case ObjectType.Proportion:
                        Proportion prop = (Proportion)obj;
                        Assert.AreNotEqual(0, prop.Num);
                        Assert.AreNotEqual(0, prop.Numbase);
                        break;

                    case ObjectType.Rest:
                        Model.Rest rest = (Model.Rest)obj;
                        Assert.AreNotEqual(Model.Duration.Null, rest.Duration);
                        break;

                    case ObjectType.Custos:
                        break;

                    case ObjectType.Dot:
                        break;

                    case ObjectType.Gap:
                        Model.Gap gap = (Model.Gap)obj;
                        Assert.AreNotEqual(Model.GapType.Null, gap.GapType);
                        break;

                    default:
                        Assert.Fail($"Test of {obj.Type} {obj.ID} failed!");
                        break;
                    }
                }
            }
        }