Ejemplo n.º 1
0
 protected override void OnTearDown()
 {
     base.OnTearDown();
     webServiceClient = null;
     listLogger       = null;
     if (repository != null)
     {
         repository.Dispose();
         repository = null;
     }
 }
Ejemplo n.º 2
0
        protected override void OnSetUp()
        {
            base.OnSetUp();
            database = new SimpleAmplaDatabase();
            database.EnableModule(module);
            configuration = new SimpleAmplaConfiguration();
            configuration.EnableModule(module);
            foreach (string location in locations)
            {
                configuration.AddLocation(module, location);
            }

            configuration.SetDefaultView(module, getViewFunc());

            webServiceClient = new SimpleDataWebServiceClient(database, configuration, new SimpleSecurityWebServiceClient("User"));
            listLogger       = new ListLogger();
            repository       = new AmplaRepository <TModel>(new LoggingDataWebServiceClient(webServiceClient, listLogger),
                                                            CredentialsProvider.ForUsernameAndPassword(userName, password));
        }