Inheritance: IPartnerService
Ejemplo n.º 1
0
 public void GetByIDTest()
 {
     IPartnerService _partnerService = new PatherService(new PartnerRepository(), new AccountRepository(), new PartnerFilterFactory());
     PartnerViewModel _partnerViewModel = GetPartnerViewModel();
     _partnerService.Add(_partnerViewModel);
     Assert.IsNotNull(_partnerService.GetByID(1));
 }
Ejemplo n.º 2
0
 public void EditTest()
 {
     IPartnerService _partnerService = new PatherService(new PartnerRepository(), new AccountRepository(), new PartnerFilterFactory());
     PartnerViewModel _partnerViewModel = GetPartnerViewModel();
     _partnerService.Add(_partnerViewModel);
     _partnerViewModel.Address = "otherAddress";
     _partnerService.Edit(_partnerViewModel);
     bool actual, expected = true;
     if (_partnerService.GetByID(1).Address.CompareTo("otherAddress") == 0)
     {
         actual = true;
     }
     else
     {
         actual = false;
     }
     Assert.AreEqual(expected, actual);
 }
Ejemplo n.º 3
0
 public void GetPartnerWithMenegersTest()
 {
     IPartnerService _partnerService = new PatherService(new PartnerRepository(), new AccountRepository(), new PartnerFilterFactory());
     PartnerViewModelForAddEditView actual = _partnerService.GetPartnerWithMenegers(null);
     Assert.IsNotNull(actual);
 }
Ejemplo n.º 4
0
 public void GetPartnersTest()
 {
     IPartnerService _partnerService = new PatherService(new PartnerRepository(), new AccountRepository(), new PartnerFilterFactory());
     PartnerCollectionViewModel actual = _partnerService.GetPartners(1, 5);
     Assert.IsNotNull(actual);
 }
Ejemplo n.º 5
0
 public void GetIEnumerablePartnersCollectionTest()
 {
     IPartnerService _partnerService = new PatherService(new PartnerRepository(), new AccountRepository(), new PartnerFilterFactory());
     IEnumerable<PartnerViewModel> actual = _partnerService.GetIEnumerablePartnersCollection();
     Assert.IsNotNull(actual);
 }