protected override void OnTearDown() { base.OnTearDown(); webServiceClient = null; listLogger = null; if (repository != null) { repository.Dispose(); repository = null; } }
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)); }