public void IfGroupIdDoesntExistUpdatePrimaryGroupDoesNothing() { IPersonGroupRepository personGroupRepository = new PersonGroupRepository(new PersonRepository(new PermissionRepository(), new ChurchRepository())); personGroupRepository.SavePrimaryGroup(4, 1, _currentPerson); var primaryGroup = personGroupRepository.GetPrimaryGroup(4, _currentPerson); Assert.That(primaryGroup.GroupId, Is.EqualTo(2)); }
public void CanUpdatePrimaryGroup() { IPersonGroupRepository personGroupRepository = new PersonGroupRepository(new PersonRepository(new PermissionRepository(), new ChurchRepository())); personGroupRepository.SavePrimaryGroup(4,2, _currentPerson); var primaryGroup = personGroupRepository.GetPrimaryGroup(4, _currentPerson); Assert.That(primaryGroup.GroupId, Is.EqualTo(2)); }
public void IfPrimaryGroupDoesntExistReturnsNull() { IPersonGroupRepository personGroupRepository = new PersonGroupRepository(new PersonRepository(new PermissionRepository(), new ChurchRepository())); var primaryGroup = personGroupRepository.GetPrimaryGroup(2, _currentPerson); Assert.That(primaryGroup, Is.Null); }