Implementation Guide - ARN
  • Home
  • Contact Us
In C# create a single class that when subclassed allows this sample test code to run using only the file system for storage, no pre-built database allowed; use files.  Create all classes required to compile and pass the test case; you may not modify the test.  The Id, Save, Delete, and Find methods must be in the base class only; subclasses must not have to write any persistence code and may not override any base class persistence methods. 

Choose whatever types you feel appropriate, the purpose of the exercise is to see some of your code and discuss with you the solution you came up with and the choices you made.  Your resume will not be looked at without code that passes this test. Submit your solution as a passing nUnit test case along with your resume to jobs@allresnet.com.  We'll contact you only if your code interests us as a potential candidate; if you don't hear from us, you didn't pass the test because we didn't like something about your solution.
​
[TestCase]
        public void ProgrammerTest() {
            var address = new Address("5455 Apache Trail", "Queen Creek", "AZ", "85243");
            var person = new Person("Jane", "Smith", address);
            var biz = new Business("Alliance Reservations Network", address);

            Assert.IsNullOrEmpty(person.Id);
            person.Save();
            Assert.IsNotNullOrEmpty(person.Id);

            Assert.IsNullOrEmpty(biz.Id);
            biz.Save();
            Assert.IsNotNullOrEmpty(biz.Id);

            Person savedPerson = Person.Find(person.Id);
            Assert.IsNotNull(savedPerson);
            Assert.AreSame(person.Address, address);
            Assert.AreEqual(savedPerson.Address, address);
            Assert.AreEqual(person.Id, savedPerson.Id);
            Assert.AreEqual(person.FirstName, savedPerson.FirstName);
            Assert.AreEqual(person.LastName, savedPerson.LastName);
            Assert.AreEqual(person, savedPerson);
            Assert.AreNotSame(person, savedPerson);
            Assert.AreNotSame(person.Address, savedPerson.Address);

            Business savedBusiness = Business.Find(biz.Id);
            Assert.IsNotNull(savedBusiness);
            Assert.AreSame(biz.Address, address);
            Assert.AreEqual(savedBusiness.Address, address);
            Assert.AreEqual(biz.Id, savedBusiness.Id);
            Assert.AreEqual(biz.Name, savedBusiness.Name);
            Assert.AreEqual(biz, savedBusiness);
            Assert.AreNotSame(biz, savedBusiness);
            Assert.AreNotSame(biz.Address, savedBusiness.Address);

            var dictionary = new Dictionary<object, object> {[address] = address,[person] = person,[biz] = biz};
            Assert.IsTrue(dictionary.ContainsKey(new Address("5455 Apache Trail", "Queen Creek", "AZ", "85243")));
            Assert.IsTrue(dictionary.ContainsKey(new Person("Jane", "Smith", address)));
            Assert.IsTrue(dictionary.ContainsKey(new Business("Alliance Reservations Network", address)));
            Assert.IsFalse(dictionary.ContainsKey(new Address("54553 Apache Trail", "Queen Creek", "AZ", "85243")));
            Assert.IsFalse(dictionary.ContainsKey(new Person("Jim", "Smith", address)));
            Assert.IsFalse(dictionary.ContainsKey(new Business("Alliance Reservation Networks", address)));

            var deletedPersonId = person.Id;
            person.Delete();
            Assert.IsNullOrEmpty(person.Id);
            Assert.IsNull(Person.Find(deletedPersonId));

            var deletedBizId = biz.Id;
            biz.Delete();
            Assert.IsNullOrEmpty(biz.Id);
            Assert.IsNull(Business.Find(deletedBizId));
        }
Fill out my online form.
Fill out my online form.
Please note, we limit our API to select clients due to an overwhelming demand. Please fill out the form below to see if you meet our requirements, and so we may learn more about your business.
Fill out my online form.
Fill out my online form.
Please note, we limit our application to select clients due to an overwhelming demand. Please fill out the form below to see if you meet our requirements, and so we may learn more about your business.
Call our customer service center during the following business hours and our customer service department will respond as quickly as possible. 

U.S. toll-free 1-800-419-1545 or International call 1-602-952-2106

Currently:
M-F: 5AM PT / 8AM ET - 4PM PT / 7PM ET
Weekends: 9AM PT / 12PM – 2PM PT / 5PM ET

As of Jan 1st, 2017
M-F: 6AM PT / 9AM ET - 5PM PT / 8PM ET
Weekends: 9AM PT / 12PM – 2PM PT / 5PM ET

Closed during U.S. holidays: New Years Day, Memorial Day, Independence Day, Labor Day, Thanksgiving, and Christmas

IMPORTANT: If you need to cancel your reservation immediately and you are attempting to make a cancellation requests outside our call center hours listed above, please use the cancellation link provided to you in the confirmation email you received or click the link below. If you are unable to use these links, please attempt to cancel directly with the hotel as a last resort and follow up with us during normal business hours. 

http://www.reservetravel.com/v6/cancel-or-resend
​
​

Contact Us

© 1995-2017 Alliance Reservations Network .
  • About Us
  • Our Solutions
  • Implementation Guide
  • Contact Us
  • Home
  • Partner Form Test
  • Programmer Test
✕