コード例 #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()));
        }
コード例 #2
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new JustificationObjectiveService(context);
 }
コード例 #3
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new GenderService(context);
 }
コード例 #4
0
 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);
 }
コード例 #8
0
 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);
 }
コード例 #12
0
 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);
 }
コード例 #19
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new DependentTypeService(context);
 }
コード例 #20
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new FocusService(context);
 }
コード例 #21
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new BookmarkService(context);
 }
コード例 #22
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new LocationTypeService(context);
 }
コード例 #23
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new PhoneNumberService(context);
 }
コード例 #24
0
 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();
 }
コード例 #27
0
 public void TestInit()
 {
     context = new TestEcaContext();
     service = new MembershipService(context);
 }