Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2014-2015 Philip Helger (www.helger.com) philip[at]helger[dot]com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package com.helger.appbasics.mock;
Non-web scope aware test rule, with a defined storage root directory

Author(s):
Philip Helger
public class AppBasicTestRule extends ScopeTestRule
  private final File m_aDataPath;
  private final File m_aServletContextPath;

  
Ctor using the default storage path from com.helger.scopes.mock.ScopeTestRule
  public AppBasicTestRule ()
  {
  }

  
Ctor with an arbitrary path

Parameters:
aDataPath The data path to be used. May not be null.
aServletContextPath The servlet context path to be used. May not be null.
  public AppBasicTestRule (@Nonnull final File aDataPath, @Nonnull final File aServletContextPath)
  {
    ValueEnforcer.notNull (aDataPath"DataPath");
    ValueEnforcer.notNull (aServletContextPath"ServletContextPath");
     = aDataPath.getAbsoluteFile ();
     = aServletContextPath.getAbsoluteFile ();
  }

  

Returns:
The used storage path. Never null.
  public File getStoragePath ()
  {
    return ;
  }
  public void before ()
  {
    super.before ();
    AppBasicTestInit.initAppBasics ();
  }
  public void after ()
  {
    AppBasicTestInit.shutdownAppBasics ();
    super.after ();
  }
New to GrepCode? Check out our FAQ X