예제 #1
0
        public void TestPhoneNumberTypes()
        {
            var australia = _locationQuery.GetCountry("Australia");
            var india     = _locationQuery.GetCountry("India");

            Assert.AreEqual(PhoneNumberType.Mobile, _phoneNumbersQuery.GetPhoneNumberType("0412121212", australia));
            Assert.AreEqual(PhoneNumberType.Work, _phoneNumbersQuery.GetPhoneNumberType("0512121212", australia));
            Assert.AreEqual(PhoneNumberType.Work, _phoneNumbersQuery.GetPhoneNumberType("98888888", australia));
            Assert.AreEqual(PhoneNumberType.Mobile, _phoneNumbersQuery.GetPhoneNumberType("  0421323332", australia));

            Assert.AreEqual(PhoneNumberType.Work, _phoneNumbersQuery.GetPhoneNumberType("0412121212", india));
            Assert.AreEqual(PhoneNumberType.Work, _phoneNumbersQuery.GetPhoneNumberType("0512121212", india));
            Assert.AreEqual(PhoneNumberType.Work, _phoneNumbersQuery.GetPhoneNumberType("98888888", india));
            Assert.AreEqual(PhoneNumberType.Work, _phoneNumbersQuery.GetPhoneNumberType("  0421323332", india));
        }
예제 #2
0
        public void TestAddress()
        {
            // Create organisation.

            var organisation = new Organisation
            {
                Name    = OrganisationName,
                Address = new Address {
                    Location = _locationQuery.ResolveLocation(_locationQuery.GetCountry(Country), Location)
                },
            };

            _organisationsCommand.CreateOrganisation(organisation);
            AssertOrganisation(organisation, _organisationsQuery.GetOrganisation(organisation.Id));

            // Create employers.

            var employer = new Employer
            {
                EmailAddress = new EmailAddress {
                    Address = EmailAddress, IsVerified = true
                },
                FirstName   = FirstName,
                LastName    = LastName,
                PhoneNumber = new PhoneNumber {
                    Number = PhoneNumber
                },
                Organisation = organisation,
            };

            _employersCommand.CreateEmployer(employer);

            AssertOrganisation(organisation, _employersQuery.GetEmployer(employer.Id).Organisation);
        }
예제 #3
0
        private readonly bool[] _homeLocations; // indexed by location ID

        public LocationFieldHandler(string locationField, string relocationsField, IBooster booster, ILocationQuery locationQuery)
        {
            _locationFieldName    = locationField;
            _relocationsFieldName = relocationsField;
            _booster = booster;

            // Build the world index.

            _worldIndex = new BitWorldIndex();
            _worldIndex.BuildUp(locationQuery, true);

            // Mark locations in the home country.

            var homeCountry   = locationQuery.GetCountry("Australia");
            var homePointSet  = _worldIndex.GetPointSet(homeCountry.Id, 0);
            var maxPointSetId = _worldIndex.GetMaxPointSetId();

            _homeLocations = new bool[maxPointSetId + 1];

            foreach (var location in _worldIndex.GetKnownLocations())
            {
                if (location.Value.Overlaps(homePointSet))
                {
                    _homeLocations[location.Key] = true;
                }
            }
        }
예제 #4
0
 public JobAdMapper(ILocationQuery locationQuery, IIndustriesQuery industriesQuery, string[] ignoredCompanies)
 {
     _locationQuery    = locationQuery;
     _ignoredCompanies = ignoredCompanies;
     _australia        = _locationQuery.GetCountry("Australia");
     _industryMap      = CreateIndustryMap(industriesQuery);
 }
예제 #5
0
        public void TestInitialize()
        {
            _australia = _locationQuery.GetCountry("Australia");

            Resolve <IDbConnectionFactory>().DeleteAllTestData();
            JobAdSearchHost.ClearIndex();

            var employer = _employerAccountsCommand.CreateTestEmployer("jobposter", _organisationsCommand.CreateTestOrganisation("The Job Advertiser"));

            _one                    = employer.CreateTestJobAd("Title one", "The content for the first ad");
            _one.CreatedTime        = DateTime.Now.AddDays(-1); // Just to make sure it's before "two"; we only index days.
            _one.Description.Salary = new Salary {
                LowerBound = 50000, UpperBound = 60000, Rate = SalaryRate.Year, Currency = Currency.AUD
            };
            _jobAdsCommand.CreateJobAd(_one);
            _jobAdsCommand.OpenJobAd(_one);

            _two = employer.CreateTestJobAd("Title two", "Different content for the second ad");
            _locationQuery.ResolvePostalSuburb(_two.Description.Location, _australia, "2000");
            _two.Description.CompanyName = "Really Bad Employers";
            _two.Description.JobTypes    = JobTypes.Contract;
            _two.Description.Industries  = new List <Industry> {
                _industriesQuery.GetIndustry("Other")
            };
            _jobAdsCommand.CreateJobAd(_two);
            _jobAdsCommand.OpenJobAd(_two);
        }
예제 #6
0
        private void UpdateMember(Member member, ContactDetailsMemberModel memberModel)
        {
            // Names.

            member.FirstName = memberModel.FirstName;
            member.LastName  = memberModel.LastName;

            // Location.

            var country = _locationQuery.GetCountry(memberModel.CountryId ?? ActivityContext.Location.Country.Id);

            member.Address.Location = _locationQuery.ResolveLocation(country, memberModel.Location);

            // Email addresses.

            member.EmailAddresses = new List <EmailAddress> {
                new EmailAddress {
                    Address = memberModel.EmailAddress
                }
            };
            if (!string.IsNullOrEmpty(memberModel.SecondaryEmailAddress))
            {
                member.EmailAddresses.Add(new EmailAddress {
                    Address = memberModel.SecondaryEmailAddress
                });
            }

            // Phone numbers.

            member.PhoneNumbers = new List <PhoneNumber> {
                new PhoneNumber {
                    Number = memberModel.PhoneNumber, Type = memberModel.PhoneNumberType
                }
            };
            if (!string.IsNullOrEmpty(memberModel.SecondaryPhoneNumber))
            {
                member.PhoneNumbers.Add(new PhoneNumber {
                    Number = memberModel.SecondaryPhoneNumber, Type = memberModel.SecondaryPhoneNumberType
                });
            }

            // Others.

            member.EthnicStatus = memberModel.EthnicStatus;
            member.Gender       = memberModel.Gender;
            member.DateOfBirth  = memberModel.DateOfBirth;
        }
예제 #7
0
        public void RelocationTestsInitialize()
        {
            var australia = _locationQuery.GetCountry("Australia");

            _tasmania = new LocationReference(_locationQuery.GetCountrySubdivision(australia, "TAS"));
            _armadale = new LocationReference(_locationQuery.GetPostalCode(australia, "3143"));
            _malvern  = new LocationReference(_locationQuery.GetPostalSuburb(_locationQuery.GetPostalCode(australia, "3144"), "Malvern"));
        }
예제 #8
0
 private void InitialiseContext(ILocationQuery locationQuery, IChannelsQuery channelsQuery)
 {
     _eventSource.Raise(Event.Information, "InitialiseContext", "Initializing context...");
     ActivityContext.Current.Register(new SessionVerticalContext());
     ActivityContext.Current.Register(new SessionCommunityContext());
     ActivityContext.Current.Register(new HttpContextLocationContext(locationQuery.GetCountry("Australia")));
     ActivityContext.Current.Register(new ChannelContext(channelsQuery.GetChannelApp(channelsQuery.GetChannel("Web").Id, "Web")));
 }
예제 #9
0
 public PurchasesCommand(ISendSecurePayCommand sendSecurePayCommand, ILocationQuery locationQuery, bool useAntiFraud, string merchantId, string password, string antiFraudMerchantId, string antiFraudPassword, string country)
 {
     _sendSecurePayCommand = sendSecurePayCommand;
     _useAntiFraud         = useAntiFraud;
     _merchantId           = _useAntiFraud ? antiFraudMerchantId : merchantId;
     _password             = _useAntiFraud ? antiFraudPassword : password;
     _country = locationQuery.GetCountry(country);
 }
예제 #10
0
        public void TestRelocationCountry()
        {
            // Member is located in an unstructured location in Australia, and is willing to relocate to Australia.

            var content = new MemberContent
            {
                Member = new Member
                {
                    Id      = Guid.NewGuid(),
                    Address = new Address {
                        Location = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), "Winnipeg MB r3e 1w1")
                    },
                },
                Candidate = new Candidate
                {
                    RelocationPreference = RelocationPreference.Yes,
                    RelocationLocations  = new List <LocationReference>
                    {
                        _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), null),
                    },
                }
            };

            IndexContent(content);

            // Search in Mackay.

            var memberQuery = new MemberSearchQuery
            {
                Location          = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), "Mackay QLD 4740"),
                Distance          = 5,
                IncludeRelocating = false,
            };
            var results = Search(memberQuery, 0, 10);

            Assert.AreEqual(0, results.MemberIds.Count);

            memberQuery = new MemberSearchQuery
            {
                Location          = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), "Mackay QLD 4740"),
                Distance          = 5,
                IncludeRelocating = true,
            };
            results = Search(memberQuery, 0, 10);
            Assert.AreEqual(1, results.MemberIds.Count);
        }
예제 #11
0
        public void TestCreate()
        {
            // Create.

            var location     = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), Location);
            var organisation = new Organisation {
                Name = Name, Address = new Address {
                    Line1 = Line1, Line2 = Line2, Location = location
                }
            };

            _organisationsCommand.CreateOrganisation(organisation);

            Assert.AreNotEqual(Guid.Empty, organisation.Address.Id);
            Assert.AreNotEqual(Guid.Empty, organisation.Address.Location.Id);

            // Assert.

            organisation = _organisationsQuery.GetOrganisation(organisation.Id);
            Assert.AreEqual(Line1, organisation.Address.Line1);
            Assert.AreEqual(Line2, organisation.Address.Line2);
            Assert.AreEqual(location.Country.Id, organisation.Address.Location.Country.Id);
            Assert.AreEqual(location.CountrySubdivision.Id, organisation.Address.Location.CountrySubdivision.Id);
            Assert.AreEqual(location.NamedLocation.Id, organisation.Address.Location.NamedLocation.Id);
            Assert.AreEqual(location.Locality.Id, organisation.Address.Location.Locality.Id);
        }
예제 #12
0
 public EmployerMemberViewsTests()
 {
     _industries = new List <Industry> {
         _industriesQuery.GetIndustries()[2]
     };
     _relocationLocations = new List <LocationReference> {
         _locationQuery.ResolveLocation(_locationQuery.GetCountry(1), "Melbourne VIC 3000")
     };
 }
예제 #13
0
 public void WorldIndexTestsInitialize()
 {
     if (_world == null)
     {
         _world = new WorldIndex();
         _world.BuildUp(_locationQuery, true);
         _australia = _locationQuery.GetCountry("Australia");
     }
 }
예제 #14
0
        private static void AppendLocationHtml(this StringBuilder sb, MemberSearchCriteria criteria, bool includeRelocating)
        {
            if (criteria.Location == null)
            {
                return;
            }

            // Don't include the location if it's the default country (ie. the user didn't really enter anything).

            if (criteria.Location.IsCountry)
            {
                var defaultCountry = _locationQuery.GetCountry("Australia");
                if (defaultCountry != null && defaultCountry.Id == criteria.Location.Country.Id)
                {
                    return;
                }
            }

            sb.AppendSeparatorHtml();
            sb.AppendStartPartHtml("Location: ", "location");

            if (criteria.Location.Locality != null)
            {
                sb.AppendFormat("within {0} km of ", criteria.EffectiveDistance);
                sb.AppendCriterionDataHtml(HttpUtility.HtmlEncode(criteria.Location.ToString()));
            }
            else if (criteria.Location.Region != null)
            {
                // Why " region"?
                // A little extra feedback to differentiate between a suburb (eg. "Melbourne VIC 3000") and
                // a region (eg. "Melbourne" for Greater Melbourne).
                if (criteria.EffectiveDistance == 0)
                {
                    sb.AppendFormat("in ");
                }
                else
                {
                    sb.AppendFormat("within {0} km of ", criteria.EffectiveDistance);
                }
                sb.AppendCriterionDataHtml(HttpUtility.HtmlEncode(criteria.Location + " region"));
            }
            else if (criteria.Location.CountrySubdivision != null)
            {
                sb.AppendCriterionDataHtml(HttpUtility.HtmlEncode(criteria.Location.IsCountry ? criteria.Location.Country.Name : criteria.Location.ToString()));
            }

            if (includeRelocating)
            {
                sb.Append(" ");
                var locationNote = criteria.IncludeInternational
                    ? "(or willing to relocate there, include international candidates)"
                    : "(or willing to relocate there)";
                sb.AppendNoteHtml(locationNote);
            }

            sb.AppendEndPartHtml();
        }
예제 #15
0
 private void AddMember(MemberContent content)
 {
     content.Member.Address = new Address {
         Location = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), null)
     };
     _membersCommand.CreateMember(content.Member);
     content.Candidate.Id = content.Member.Id;
     _candidatesCommand.CreateCandidate(content.Candidate);
     _searchService.UpdateMember(content.Member.Id);
 }
예제 #16
0
        public void TestCreateFullProfile()
        {
            var userId = Guid.NewGuid();

            var profile = new LinkedInProfile
            {
                Id               = LinkedInId,
                UserId           = userId,
                FirstName        = FirstName,
                LastName         = LastName,
                OrganisationName = OrganisationName,
                Industries       = new[] { _industriesQuery.GetIndustry(Industry) },
                Location         = _locationQuery.ResolveLocation(_locationQuery.GetCountry(Country), Location),
            };

            _linkedInCommand.UpdateProfile(profile);
            AssertProfile(profile, _linkedInQuery.GetProfile(LinkedInId));
            AssertProfile(profile, _linkedInQuery.GetProfile(profile.UserId));
        }
예제 #17
0
        public void TestSimpleSort()
        {
            _australia = _locationQuery.GetCountry("Australia");

            var employer = _employerAccountsCommand.CreateTestEmployer(0, _organisationsCommand.CreateTestOrganisation(0));

            var one = employer.CreateTestJobAd("Title one", "The content for the first ad");

            one.CreatedTime        = DateTime.Now.AddDays(-1); // Just to make sure it's before "two"; we only index days.
            one.Description.Salary = new Salary {
                LowerBound = 50000, UpperBound = 60000, Rate = SalaryRate.Year, Currency = Currency.AUD
            };
            _jobAdsCommand.CreateJobAd(one);
            _jobAdsCommand.OpenJobAd(one);

            var two = employer.CreateTestJobAd("Title two", "Different content for the second ad");

            _locationQuery.ResolvePostalSuburb(two.Description.Location, _australia, "2000");
            two.Description.CompanyName = "Really Bad Employers";
            two.Description.JobTypes    = JobTypes.Contract;
            two.Description.Industries  = new List <Industry> {
                _industriesQuery.GetIndustry("Other")
            };
            _jobAdsCommand.CreateJobAd(two);
            _jobAdsCommand.OpenJobAd(two);

            var member = new Member {
                Id = Guid.NewGuid()
            };
            var flagList = _jobAdFlagListsQuery.GetFlagList(member);

            _memberJobAdListsCommand.AddJobAdToFlagList(member, flagList, one.Id);
            _memberJobAdListsCommand.AddJobAdToFlagList(member, flagList, two.Id);

            // Title only

            var criteria = new JobAdSearchSortCriteria {
                SortOrder = JobAdSortOrder.JobType
            };

            TestSort(member, criteria, one, two);

            // Title and content

            criteria = new JobAdSearchSortCriteria {
                SortOrder = JobAdSortOrder.CreatedTime
            };
            TestSort(member, criteria, two, one);

            // No results

            //criteria = new JobAdSortCriteria { AdTitle = "one", Keywords = "second" };
            //TestSort(criteria);
        }
예제 #18
0
 private Member CreateMember(int index)
 {
     return(new Member
     {
         FirstName = string.Format(FirstNameFormat, index),
         LastName = string.Format(LastNameFormat, index),
         VisibilitySettings = new VisibilitySettings(),
         Address = new Address {
             Location = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), null)
         },
     });
 }
예제 #19
0
        public void TestUpdateAllJobAdObjects()
        {
            var employer = CreateEmployer();

            var country    = _locationQuery.GetCountry("Australia");
            var industries = _industriesQuery.GetIndustries();

            var jobAd = new JobAd
            {
                PosterId       = employer.Id,
                Title          = string.Format(TitleFormat, 0),
                ContactDetails = new ContactDetails
                {
                    FirstName    = string.Format(FirstNameFormat, 0),
                    LastName     = string.Format(LastNameFormat, 0),
                    EmailAddress = string.Format(EmailAddressFormat, 0),
                    CompanyName  = string.Format(CompanyFormat, 0),
                },
                Description =
                {
                    Content    = string.Format(ContentFormat,                    1),
                    Location   = _locationQuery.ResolveLocation(country, Location1),
                    Industries = new List <Industry>
                    {
                        industries[0],
                        industries[1],
                    }
                }
            };

            _jobAdsCommand.CreateJobAd(jobAd);

            // Update it.

            jobAd.ContactDetails = new ContactDetails
            {
                FirstName    = string.Format(FirstNameFormat, 1),
                LastName     = string.Format(LastNameFormat, 1),
                EmailAddress = string.Format(EmailAddressFormat, 1),
                CompanyName  = string.Format(CompanyFormat, 1),
            };

            jobAd.Description.Location   = _locationQuery.ResolveLocation(country, Location2);
            jobAd.Description.Industries = new List <Industry>
            {
                industries[2]
            };

            _jobAdsCommand.UpdateJobAd(jobAd);
        }
예제 #20
0
        public LocationMapper(ILocationQuery locationQuery)
        {
            _world.BuildUp(locationQuery, false);
            var australia = locationQuery.GetCountry("Australia");

            Add(locationQuery, australia, "Canberra", "ACT", "20-162-3", "20-162-4");
            Add(locationQuery, australia, "Sydney", "NSW", "20-163-5", "20-163-6");
            Add(locationQuery, australia, "Darwin", "NT", "20-164-7", "20-164-8");
            Add(locationQuery, australia, "Brisbane", "QLD", "20-165-9", "20-165-10");
            Add(locationQuery, australia, "Adelaide", "SA", "20-166-11", "20-166-12");
            Add(locationQuery, australia, "Hobart", "TAS", "20-167-13", "20-167-14");
            Add(locationQuery, australia, "Melbourne", "VIC", "20-168-1", "20-168-2");
            Add(locationQuery, australia, "Perth", "WA", "20-169-15", "20-169-16");
        }
예제 #21
0
 private JobAd CreateJobAd(JobPoster jobPoster)
 {
     return(CreateJobAd(
                jobPoster,
                0,
                j =>
     {
         j.Description.Content = "Centrally located in the heart of Melbourne CBD, Advanced Training provides a wide range technical and desktop application training to Government, Corporate and SME clients throughout Australia<br /><br />Reporting directly to the Training Manager, You would ideally have the following:<br /><br />Qualifications &amp; Education:<br />* MCT, Cert IV in Workplace Training and Assessment or TAA, Dip Ed<br />* MCITP, MCSE 2003, MCAD/MCSD, or MCDBA<br />* CCNA, Linux, Citrix, VM Ware looked upon favourably<br /><br />Required Skills:<br />* Either/OR in Microsoft Networking / .Net programming / SQL 2000/2005<br />* Excellent interpersonal communication skills<br />* Technical ability in varied environments<br />* Enthusiasm<br /><br />Duties &amp; Responsibilities::<br />The position involves the following activities:<br />* Facilitation of networking, software development or database courses <br />* Post-course customer support<br />* Assisting sales team with client needs analysis<br /><br />If you are either a talented IT Trainer or an IT Certified Professional with significant industry experience with a desire to teach, then this is an outstanding opportunity for those looking for that next challenge in their careers.<br />If you are looking for a great career opportunity and enjoy working with people please email your CV to [email protected]";
         j.Title = "IT Trainer - MCSE / MCSA";
         j.Description.Location = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), "Norlane VIC 3214");
         j.Description.Salary = new Salary {
             LowerBound = 80000, UpperBound = 120000, Currency = Currency.AUD, Rate = SalaryRate.Year
         };
     }));
 }
예제 #22
0
        private static LocationReference Map(string location, string postcode, ILocationQuery locationQuery)
        {
            // Need to consolidate location and postcode into a single JobLocation.

            location = (location ?? string.Empty).Trim();
            postcode = (postcode ?? string.Empty).Trim();
            if (postcode.Length != 0)
            {
                // If the postcode is not already part of the location then add it in, but only if it is actually recognised as a postcode.

                if (location.IndexOf(postcode, StringComparison.InvariantCultureIgnoreCase) == -1)
                {
                    var postalCode = locationQuery.GetPostalCode(locationQuery.GetCountry("Australia"), postcode);
                    if (postalCode != null)
                    {
                        location += " " + postcode;
                    }
                }
            }

            // Resolve the location.

            return(locationQuery.ResolveLocation(locationQuery.GetCountry("Australia"), location));
        }
예제 #23
0
        public void TestLocation()
        {
            var country = _locationQuery.GetCountry("Australia");

            Test(new MemberSearchCriteria {
                Location = _locationQuery.ResolveLocation(country, null)
            });
            Test(new MemberSearchCriteria {
                Location = _locationQuery.ResolveLocation(country, "Melbourne")
            });
            Test(new MemberSearchCriteria {
                Location = _locationQuery.ResolveLocation(country, "VIC")
            });
            Test(new MemberSearchCriteria {
                Location = _locationQuery.ResolveLocation(country, "Melbourne VIC 3000")
            });
        }
        public void TestLocation()
        {
            var criteria = new JobAdSearchCriteria();

            criteria.SetKeywords(null, null, "Test", null);

            var country = _locationQuery.GetCountry("Australia");

            criteria.Location = _locationQuery.ResolveLocation(country, null);
            Test(criteria, "test jobs in australia");
            criteria.Location = _locationQuery.ResolveLocation(country, "Melbourne");
            Test(criteria, "test jobs in melbourne australia");
            criteria.Location = _locationQuery.ResolveLocation(country, "VIC");
            Test(criteria, "test jobs in vic australia");
            criteria.Location = _locationQuery.ResolveLocation(country, "Melbourne VIC 3000");
            Test(criteria, "test jobs in melbourne vic 3000 australia");
        }
예제 #25
0
        public void TestNoCountryPostcode()
        {
            var id = CreateSavedJobAdSearch(
                "LinkMe.Common.JobBoard.SimpleJobSearchCriteria",
                new Dictionary <string, string>
            {
                { "Location", "sydney" },
                { "Postcode", "2000" },
            }
                );
            var jobAdSearchesQuery = CreateJobAdSearchesQuery(false);
            var search             = jobAdSearchesQuery.GetJobAdSearch(id);

            var sydney = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), "Sydney NSW 2000");

            Assert.AreEqual(sydney, search.Criteria.Location);
        }
예제 #26
0
        public void TestNoCountryPostcode()
        {
            var id = CreateSavedResumeSearch(
                "LinkMe.Common.Managers.Search.SimpleResumeSearchCriteria",
                new Dictionary <string, string>
            {
                { "Location", "sydney" },
                { "Postcode", "2000" },
            }
                );
            var memberSearchesQuery = CreateMemberSearchesQuery();
            var search = memberSearchesQuery.GetMemberSearch(id);

            var sydney = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), "Sydney NSW 2000");

            Assert.AreEqual(sydney, search.Criteria.Location);
        }
예제 #27
0
        public void TestLocation()
        {
            var country = _locationQuery.GetCountry("Australia");

            Test(new JobAdSearchCriteria {
                Location = _locationQuery.ResolveLocation(country, null)
            }, "CountryId=1");
            Test(new JobAdSearchCriteria {
                Location = _locationQuery.ResolveLocation(country, "Melbourne")
            }, "CountryId=1&Location=Melbourne");
            Test(new JobAdSearchCriteria {
                Location = _locationQuery.ResolveLocation(country, "VIC")
            }, "CountryId=1&Location=VIC");
            Test(new JobAdSearchCriteria {
                Location = _locationQuery.ResolveLocation(country, "Melbourne VIC 3000")
            }, "CountryId=1&Location=Melbourne+VIC+3000");
        }
예제 #28
0
        protected override IList <PhoneNumber> GetPhoneNumbers(XmlDocument xmlDoc)
        {
            var phoneNumber = Get(xmlDoc, "//contact/phone");

            if (string.IsNullOrEmpty(phoneNumber))
            {
                return(null);
            }

            return(new List <PhoneNumber>
            {
                new PhoneNumber
                {
                    Number = phoneNumber,
                    Type = _phoneNumbersQuery.GetPhoneNumberType(phoneNumber, _locationQuery.GetCountry(Country)),
                }
            });
        }
예제 #29
0
        public void TestVerifyOrganisationWithAddress()
        {
            var organisation = _organisationsCommand.CreateTestOrganisation(1);
            var location     = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), Location);

            organisation.Address = new Address {
                Line1 = Line1, Line2 = Line2, Location = location
            };
            _organisationsCommand.UpdateOrganisation(organisation);

            var accountManagerId     = Guid.NewGuid();
            var verifiedById         = Guid.NewGuid();
            var verifiedOrganisation = _organisationsCommand.VerifyOrganisation(organisation, accountManagerId, verifiedById);

            AssertVerifiedOrganisation(organisation, accountManagerId, verifiedById, verifiedOrganisation);
            AssertVerifiedOrganisation(organisation, accountManagerId, verifiedById, _organisationsQuery.GetOrganisation(organisation.Id));
            AssertVerifiedOrganisation(organisation, accountManagerId, verifiedById, _organisationsQuery.GetVerifiedOrganisation(organisation.Name));
        }
예제 #30
0
 protected JobAdSearchCriteria CreateCriteria(int index)
 {
     return(new JobAdSearchCriteria
     {
         AdTitle = "title" + index,
         AdvertiserName = "advertiser" + index,
         Distance = 100,
         IndustryIds = new List <Guid> {
             _industriesQuery.GetIndustries()[0].Id
         },
         JobTypes = JobTypes.FullTime,
         Location = _locationQuery.ResolveLocation(_locationQuery.GetCountry("Australia"), "Melbourne VIC 3000"),
         Salary = new Salary {
             Currency = Currency.AUD, LowerBound = 50000, UpperBound = 100000, Rate = SalaryRate.Year
         },
         CommunityId = Guid.NewGuid(),
         CommunityOnly = false,
     });
 }