Exemplo n.º 1
0
        public void testCustomerSvc()
        {
            try {
                //week 3
                //ICustomerSvc ics = factory.getCustomerSvc();

                //week 4
                ICustomerSvc ics = (ICustomerSvc)factory.getService("ICustomerSvc");

                // First let's store the Customer
                Assert.True(ics.storeCustomer(c));

                // Then let's read it back in
                c = ics.getCustomer(c.id);
                Assert.True(c.validate());

                // Update customer
                c.emailAddress = "*****@*****.**";
                Assert.True(ics.storeCustomer(c));

                // Finally, let's cleanup the file that was created
                Assert.True(ics.deleteCustomer(c.id));
            }
            catch (Exception e) {
                Console.WriteLine("Exception in testStoreCustomer: " + e.Message + "\n" + e.StackTrace);
                Assert.Fail(e.Message + "\n" + e.StackTrace);
            }
        }
Exemplo n.º 2
0
        public void testInvalidGetCustomer()
        {
            try {
                //week 3
                //ICustomerSvc ics = factory.getCustomerSvc();

                //week 4
                ICustomerSvc ics = (ICustomerSvc)factory.getService("ICustomerSvc");
                c = ics.getCustomer(1234);

                if (c != null)
                {
                    Assert.False(c.validate());
                }
            }
            catch (Exception e) {
                Console.WriteLine("Exception in testInvalidGetCustomer: " + e.Message + "\n" + e.StackTrace);
                Assert.Fail(e.Message + "\n" + e.StackTrace);
            }
        }
 public DTSecurityManagerController(IDTSecurityManagerSvc service, ICustomerSvc customerSvc)
 {
     this.service     = service;
     this.customerSvc = customerSvc;
 }
Exemplo n.º 4
0
 public CustomerController(ICustomerSvc service)
 {
     this.service = service;
 }
 public CreditInvestigationController(ILoanApplicationSvc loanApplicationSvc, ICustomerSvc customerSvc, ICreditInvestigation crdService)
 {
     this.loanService     = loanApplicationSvc;
     this.customerService = customerSvc;
     this.crdService      = crdService;
 }
 public MaintenanceAgentProfileController(IMaintenanceAgentProfileSvc service, ICustomerSvc customerSvc)
 {
     this.service     = service;
     this.customerSvc = customerSvc;
 }
Exemplo n.º 7
0
 public ApplicationController(ILoanApplicationSvc loanApplicationSvc, ICustomerSvc customerSvc)
 {
     this.service      = loanApplicationSvc;
     this.customerComp = customerSvc;
 }