public void Should_GetAllChildren() { //Arrange var inMemoryFamilyTreeData = new InMemoryFamilyTreeRepository(); //Act var children = inMemoryFamilyTreeData.GetChildren(); //Assert Assert.True(children.Count() > 0); }
public void Should_GetAllPersons() { //Arrange var inMemoryFamilyTreeData = new InMemoryFamilyTreeRepository(); //Act var persons = inMemoryFamilyTreeData.GetAllPersons(); //Assert Assert.True(persons.Count() > 0); }
public void Should_ReturnNullPersonWhenInvalidIdIsProvided() { //Arrange var Id = 789898333; var inMemoryFamilyTreeData = new InMemoryFamilyTreeRepository(); //Act var person = inMemoryFamilyTreeData.GetPersonById(Id); //Assert Assert.Null(person); }
public void Should_ReturnNullChildWhenInvalidPersonIdIsProvided() { //Arrange var personId = 2787822; var inMemoryFamilyTreeData = new InMemoryFamilyTreeRepository(); //Act var child = inMemoryFamilyTreeData.GetChildByPersonId(personId); //Assert Assert.Null(child); }
public void Should_GetParentByPersonId() { //Arrange var Id = 1; var actual = LivingStatus.Dead; var inMemoryFamilyTreeData = new InMemoryFamilyTreeRepository(); //Act var parent = inMemoryFamilyTreeData.GetParentById(Id); //Assert Assert.Equal(parent.LivingStatus, actual); }
public void Should_GetPersonByProvidedId() { //Arrange var Id = 7; var actual = "Luke"; var inMemoryFamilyTreeData = new InMemoryFamilyTreeRepository(); //Act var person = inMemoryFamilyTreeData.GetPersonById(Id); //Assert Assert.Equal(person.Name, actual); }
public void Should_GetChildByProvidedPersonId() { //Arrange var personId = 2; var actual = 5; var inMemoryFamilyTreeData = new InMemoryFamilyTreeRepository(); //Act var child = inMemoryFamilyTreeData.GetChildByPersonId(personId); //Assert Assert.Equal(child.FatherId, actual); }