Exemplo n.º 1
0
            public void ExceptionPropertyCollectionEquivalenceTesting_Danglers()
            {
                // Arrange
                var expected = new SomeNode()
                {
                    Id   = 1,
                    Name = "Moo"
                };

                // Pre-assert
                // Act
                Assert.That(
                    () =>
                {
                    Expect(() => throw new ExceptionWithNode(expected))
                    .To.Throw <ExceptionWithNode>()
                    .With.CollectionProperty(e => e.Nodes).For.Moo();
                },
                    Throws.Nothing);
            }
Exemplo n.º 2
0
 private Node CreateNode()
 {
     var node = new SomeNode();
     return node;
 }