Exemplo n.º 1
0
                public void Empty()
                {
                    var source = new BreakingReadOnlyList <object>(new List <object>());

                    var(t, x) = source.LastOrNone();
                    Assert.That(t, Is.False);
                    Assert.That(x, Is.Null);
                }
Exemplo n.º 2
0
                public void Many()
                {
                    var source = new BreakingReadOnlyList <int>(new List <int> {
                        123, 456, 789
                    });

                    var(t, x) = source.LastOrNone();
                    Assert.That(t, Is.True);
                    Assert.That(x, Is.EqualTo(789));
                }