示例#1
0
        public void TestCreateGetAddressesQuery()
        {
            var userId         = 1;
            var user           = new User(userId);
            var addressTypeId  = AddressType.Business.Id;
            var isPrimary      = true;
            var street1        = "street1";
            var street2        = "street2";
            var street3        = "street3";
            var postalCode     = "12345";
            var locationName   = "location name";
            var countryId      = 2;
            var cityId         = 3;
            var divisionId     = 4;
            var organizationId = 5;

            var organization = new Organization
            {
                OrganizationId = organizationId
            };
            var address = new Address
            {
                OrganizationId = organization.OrganizationId
            };
            var context = new TestEcaContext();

            context.Addresses.Add(address);

            var instance = new AdditionalOrganizationAddress(
                user,
                addressTypeId,
                isPrimary,
                street1,
                street2,
                street3,
                postalCode,
                locationName,
                countryId,
                cityId,
                divisionId,
                organizationId
                );

            var testAddresses = instance.CreateGetAddressesQuery(context).ToList();

            Assert.AreEqual(1, testAddresses.Count);
            Assert.IsTrue(Object.ReferenceEquals(address, testAddresses.First()));
        }
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new JustificationObjectiveService(context);
 }
示例#3
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new GenderService(context);
 }
 public void TestInit()
 {
     validator = new Mock <IBusinessValidator <AdditionalPointOfContactValidationEntity, object> >();
     context   = new TestEcaContext();
     service   = new ContactService(context, validator.Object);
 }
示例#5
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new SocialMediaTypeService(context);
 }
示例#6
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new DataPointConfigurationService(context);
 }
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new MoneyFlowSourceRecipientTypeService(context);
 }
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new ProjectStatusService(context);
 }
示例#9
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new EvaluationNoteService(context);
 }
示例#10
0
 public void TestInit()
 {
     contextMock = new Mock <TestEcaContext>();
     context     = contextMock.Object;
     service     = new EcaService(context);
 }
示例#11
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new MaritalStatusService(context);
 }
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new EmailAddressService(context);
 }
示例#13
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new LookupServiceTestServiceClass(context);
 }
示例#14
0
 public LookupServiceTestServiceClass(TestEcaContext context)
     : base(context)
 {
 }
示例#15
0
 public void TestInit()
 {
     context = new TestEcaContext();
     languageProficiencyService = new LanguageProficiencyService(context);
 }
示例#16
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new ReportService(context);
 }
示例#17
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new ParticipantStatusService(context);
 }
示例#18
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new ParticipantExchangeVisitorService(context);
 }
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new DependentTypeService(context);
 }
示例#20
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new FocusService(context);
 }
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new BookmarkService(context);
 }
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new LocationTypeService(context);
 }
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new PhoneNumberService(context);
 }
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new AddressTypeService(context);
 }
示例#25
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new DefaultExchangeVisitorFundingService(context);
 }
示例#26
0
 public void TestInit()
 {
     context = new TestEcaContext();
 }
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new MembershipService(context);
 }