public void HasGetSet() { var value = new Establishment(); var entity = new EstablishmentNode { Offspring = value }; entity.ShouldNotBeNull(); entity.Offspring.ShouldEqual(value); }
private static void BuildNodesRecursive(Establishment parent) { // operate recursively over children foreach (var child in parent.Children) { // create & add ancestor node for this child var node = new EstablishmentNode { Ancestor = parent, Offspring = child, Separation = 1, }; child.Ancestors.Add(node); // loop over the parent's ancestors foreach (var ancestor in parent.Ancestors) { // create & add ancestor node for this child node = new EstablishmentNode { Ancestor = ancestor.Ancestor, Offspring = child, Separation = ancestor.Separation + 1, }; child.Ancestors.Add(node); } // run this method again on the child BuildNodesRecursive(child); } }
public void HasGetSet() { const int value = 5; var entity = new EstablishmentNode { OffspringId = value }; entity.ShouldNotBeNull(); entity.OffspringId.ShouldEqual(value); }
public void HasGetSet() { var value = new Establishment(); var entity = new EstablishmentNode { Ancestor = value }; entity.ShouldNotBeNull(); entity.Ancestor.ShouldEqual(value); }
public void HasGetSet() { const int value = 3; var entity = new EstablishmentNode { AncestorId = value }; entity.ShouldNotBeNull(); entity.AncestorId.ShouldEqual(value); }
public void HasGetSet() { var value = new Establishment(); var entity = new EstablishmentNode { Offspring = value }; entity.ShouldNotBeNull(); entity.Offspring.ShouldEqual(value); }
public void HasGetSet() { const int value = 5; var entity = new EstablishmentNode { OffspringId = value }; entity.ShouldNotBeNull(); entity.OffspringId.ShouldEqual(value); }
public void HasGetSet() { var value = new Establishment(); var entity = new EstablishmentNode { Ancestor = value }; entity.ShouldNotBeNull(); entity.Ancestor.ShouldEqual(value); }
public void HasGetSet() { const int value = 3; var entity = new EstablishmentNode { AncestorId = value }; entity.ShouldNotBeNull(); entity.AncestorId.ShouldEqual(value); }