Example #1
0
        public void can_validate()
        {
            sut = new Spiel(new Normalschein(new Normalfeld(1,2,3,4,5,6)));
            Assert.That(sut.IsValid());

            sut = new Spiel(new Systemschein(new Systemfeld(1, 2, 3, 4, 5, 6, 7) { SID = 7 }));
            Assert.That(sut.IsValid());

            sut = new Spiel(new Normalschein().quick());
            Assert.That(sut.IsValid());

            sut = new Spiel(new Systemschein().quick());
            Assert.That(sut.IsValid());

            sut = new Spiel(new Normalschein(new Normalfeld(1, 2, 3, 4, 5)));
            Assert.That(sut.IsValid(), Is.False);

            sut = new Spiel(new Systemschein(new Systemfeld(1, 2, 3, 4, 5, 6) { SID = 7 }));
            Assert.That(sut.IsValid(), Is.False);

            sut = new Spiel(new Normalschein(new Normalfeld(1, 2, 3, 4, 5, 6), new Normalfeld(1)));
            Assert.That(sut.IsValid(), Is.False);

            sut = new Spiel(new Normalschein(new Normalfeld(1, 2, 3, 4, 5, 6)), new Systemschein(new Systemfeld(1){SID = 7}));
            Assert.That(sut.IsValid(), Is.False);
        }
Example #2
0
 public void can_manipulate_collection_item_indices()
 {
     sut = new Spiel(new Normalschein());
     int i = 0;
     foreach (var tipp in sut.Scheine)
         Assert.That(tipp.Index, Is.EqualTo(i++));
 }
 public void sup()
 {
     spiel = new Spiel(
                     new Systemschein(
                         new Systemfeld(1, 2, 3) { SID = 13 }) {
                             IsSpiel77 = true,
                             IsSuper6 = true,
                             Losnummer = "0000001"
                         });
 }
Example #4
0
 public SpielEdit(ISpiel spiel)
     : this()
 {
     m_spiel      = spiel;
     Summary.Text = spiel.Text;
 }
 // todo: what's that hackish cast about?
 public IEvaluationResult evaluate(ISpiel spiel)
 {
     Guard.ifNull<ISpiel>(spiel);
     return new EvaluationResult(new Sitzung(spiel), this.ausspielung);
 }
Example #6
0
 public Application(ISpiel spiel)
 {
     _spiel = spiel;
 }
Example #7
0
 public void ctor()
 {
     sut = new Spiel();
     Assert.That(sut.Vorlage, Is.Null);
     Assert.That(sut.Scheine.Count, Is.EqualTo(0));
 }