예제 #1
0
 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));
 }
예제 #2
0
 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));
 }
예제 #3
0
 public void IfPrimaryGroupDoesntExistReturnsNull()
 {
     IPersonGroupRepository personGroupRepository = new PersonGroupRepository(new PersonRepository(new PermissionRepository(), new ChurchRepository()));
     var primaryGroup = personGroupRepository.GetPrimaryGroup(2, _currentPerson);
     Assert.That(primaryGroup, Is.Null);
 }