public void SubscriberLocationModel_Property_HasServiceAddress_Behavior_DataDriven_XmlFile()
        {
            //locationId, address1, address2, city, state, zip, expected
            var address1 = DataConversion(Convert.ToString(TestContext.DataRow["address1"]));
            var address2 = DataConversion(Convert.ToString(TestContext.DataRow["address2"]));
            var city = DataConversion(Convert.ToString(TestContext.DataRow["city"]));
            var state = DataConversion(Convert.ToString(TestContext.DataRow["state"]));
            var zip = DataConversion(Convert.ToString(TestContext.DataRow["zip"]));
            var expected = Convert.ToBoolean(TestContext.DataRow["expected"]);

            // Arrange
            var locationModel = new SubscriberLocationModel()
            {
                Address1 = address1,
                Address2 = address2,
                City = city,
                State = state,
                ZipCode = zip
            };

            // Act
            var hasAddress = locationModel.HasServiceAddress;

            // Assert
            Assert.AreEqual(expected, hasAddress, string.Format("Failure for address1 \"{0}\", address2 \"{1}\", city \"{2}\", state \"{3}\", zip \"{4}\", expected \"{5}\"", address1, address2, city, state, zip, expected));
        }
 private static void ValidateLocation(SubscriberLocationModel expected, SubscriberLocationModel actual)
 {
     Assert.AreEqual(expected.LocationID, actual.LocationID, "Location ID does not match");
     Assert.AreEqual(expected.Address1, actual.Address1, "AddressLine1 does not match");
     Assert.AreEqual(expected.Address2, actual.Address2, "Address2 does not match");
     Assert.AreEqual(expected.State, actual.State, "StateName does not match");
     Assert.AreEqual(expected.City, actual.City, "CityName does not match");
     Assert.AreEqual(expected.ZipCode, actual.ZipCode, "ZipCode does not match");
     Assert.AreEqual(expected.Headend, actual.Headend, "HeadendCode does not match");
     Assert.AreEqual(expected.RateCenter, actual.RateCenter, "RateCenter does not match");
     Assert.AreEqual(expected.NetworkLocationCode, actual.NetworkLocationCode, "NetworkLocatonCode does not match");
 }
        public void SubscriberLocationModel_Has_Properties_Are_True()
        {
            // Arrange - nothing to do here...

            // Act - not much to do here
            var locationModel = new SubscriberLocationModel
            {
                AssociatedSubID = "370103469893",
                Address1 = "1234 Main Street",
                Address2 = "Apt. A",
                City = "Renton",
                State = "WA",
                ZipCode = "98059"
            };

            // Assert - verify Has* properties are now true
            Assert.IsTrue(locationModel.HasServiceAddress);
            Assert.IsTrue(locationModel.HasAddress2);
            Assert.IsTrue(locationModel.HasCityStateZip);
            Assert.IsTrue(locationModel.HasSubscriber);
        }