Example #1
0
        public void TestProjectController_AddressCompare(string httpMethod, long projectId)
        {
            SetUpProjectControllerForTesting(httpMethod);
            projectController.CurrentUser = user;

            ProjectModel oldModel = projectService.GetProjectModel(user, projectId).Model as ProjectModel;
            ProjectModel newModel = new ProjectModel();

            newModel.CustomerAddress.AddressLine1 = "5151 San Felipe St";
            newModel.CustomerAddress.Location     = "Houston";
            newModel.CustomerAddress.StateId      = 57;
            newModel.CustomerAddress.PostalCode   = "77056";
            newModel.CustomerAddress.CountryCode  = "US";
            Dictionary <string, bool> result = projectController.AddressCompare(oldModel, newModel);

            Assert.That(result["IsSameOnDealerAddress"], Is.EqualTo(true));

            newModel.CustomerAddress.AddressLine1 = "5151";

            result = projectController.AddressCompare(oldModel, newModel);

            Assert.That(result["IsSameOnDealerAddress"], Is.EqualTo(false));
        }