Esempio n. 1
0
        public void MyTestInitialize()
        {
            this.target = new AppLawEnforcementController();

            this.contact = new Contact
            {
                Email    = "*****@*****.**",
                ID       = 1,
                Website  = "www.test.org",
                Phone    = "9373608284",
                HelpLine = "9373608888"
            };
            this.state = new State {
                Abbreviation = "OH", CountryID = 1, FullName = "Ohio", ID = 1
            };

            this.location1 = new Location
            {
                City            = "testville 1",
                ContactID       = 1,
                Contact         = this.contact,
                ContactPersonID = 1,
                ID      = 1,
                Display = true,
                Zip     = 45344,
                Street  = "Test way 1",
                State   = this.state,
                StateID = this.state.ID
            };
            this.location2 = new Location
            {
                City            = "testville 2",
                ContactID       = 2,
                Contact         = this.contact,
                ContactPersonID = 2,
                ID      = 2,
                Display = true,
                Zip     = 45344,
                Street  = "Test way 2",
                State   = this.state,
                StateID = this.state.ID
            };

            this.locations = new List <Location> {
                this.location1, this.location2
            };

            this.websiteAddress1 = string.Format(
                "{0}, {1}, {2}, {3}",
                this.location1.Street,
                this.location1.City,
                this.location1.State.Abbreviation,
                this.location1.Zip);

            this.websiteAddress2 = string.Format(
                "{0}, {1}, {2}, {3}",
                this.location2.Street,
                this.location2.City,
                this.location2.State.Abbreviation,
                this.location2.Zip);

            var providerService11 = new ProviderService {
                ID = 1, ProviderID = 1, ServiceID = 1
            };
            var providerService12 = new ProviderService {
                ID = 2, ProviderID = 1, ServiceID = 2
            };
            var providerService13 = new ProviderService {
                ID = 3, ProviderID = 1, ServiceID = 3
            };

            var providerService21 = new ProviderService {
                ID = 1, ProviderID = 2, ServiceID = 1
            };
            var providerService22 = new ProviderService {
                ID = 2, ProviderID = 2, ServiceID = 2
            };
            var providerService23 = new ProviderService {
                ID = 3, ProviderID = 2, ServiceID = 3
            };

            this.providerServices1 = new List <ProviderService>
            {
                providerService11,
                providerService12,
                providerService13,
            };

            this.providerServices2 = new List <ProviderService>
            {
                providerService21,
                providerService22,
                providerService23
            };

            this.serviceProvider1 = new ServiceProvider
            {
                Description      = "Test description for test 1",
                ID               = 1,
                DisplayRank      = 1,
                ProviderName     = "Test 1",
                Locations        = this.locations,
                ProviderServices = this.providerServices1
            };
            this.serviceProvider2 = new ServiceProvider
            {
                Description      = "Test description for test 2",
                ID               = 2,
                DisplayRank      = 2,
                ProviderName     = "Test 2",
                Locations        = this.locations,
                ProviderServices = this.providerServices2
            };

            this.serviceProviderList = new List <ServiceProvider> {
                this.serviceProvider1, this.serviceProvider2
            };
        }
 public void TestInitialize()
 {
     this.target = new AppLawEnforcementController();
 }