Пример #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);
 }