Class: AppEngine::Testing::TestEnv

Inherits:
Object
  • Object
show all
Includes:
ApiProxy::Environment
Defined in:
lib/appengine-apis/testing.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTestEnv

Returns a new instance of TestEnv.



41
42
43
44
45
46
47
48
# File 'lib/appengine-apis/testing.rb', line 41

def initialize
  @appid = "test"
  @version = "1.0"
  @auth_domain= "gmail.com"
  @default_namespace = @request_namespace  = ""
  @email = ""
  @attributes = java.util.HashMap.new
end

Instance Attribute Details

#admin=(value) ⇒ Object (writeonly)

Sets the attribute admin

Parameters:

  • value

    the value to set the attribute admin to.



37
38
39
# File 'lib/appengine-apis/testing.rb', line 37

def admin=(value)
  @admin = value
end

#appid=(value) ⇒ Object (writeonly)

Sets the attribute appid

Parameters:

  • value

    the value to set the attribute appid to.



37
38
39
# File 'lib/appengine-apis/testing.rb', line 37

def appid=(value)
  @appid = value
end

#attributesObject (readonly)

Returns the value of attribute attributes.



39
40
41
# File 'lib/appengine-apis/testing.rb', line 39

def attributes
  @attributes
end

#auth_domain=(value) ⇒ Object (writeonly)

Sets the attribute auth_domain

Parameters:

  • value

    the value to set the attribute auth_domain to.



38
39
40
# File 'lib/appengine-apis/testing.rb', line 38

def auth_domain=(value)
  @auth_domain = value
end

#default_namespace=(value) ⇒ Object (writeonly)

Sets the attribute default_namespace

Parameters:

  • value

    the value to set the attribute default_namespace to.



38
39
40
# File 'lib/appengine-apis/testing.rb', line 38

def default_namespace=(value)
  @default_namespace = value
end

#email=(value) ⇒ Object (writeonly)

Sets the attribute email

Parameters:

  • value

    the value to set the attribute email to.



37
38
39
# File 'lib/appengine-apis/testing.rb', line 37

def email=(value)
  @email = value
end

#request_namespace=(value) ⇒ Object (writeonly)

Sets the attribute request_namespace

Parameters:

  • value

    the value to set the attribute request_namespace to.



38
39
40
# File 'lib/appengine-apis/testing.rb', line 38

def request_namespace=(value)
  @request_namespace = value
end

#version=(value) ⇒ Object (writeonly)

Sets the attribute version

Parameters:

  • value

    the value to set the attribute version to.



37
38
39
# File 'lib/appengine-apis/testing.rb', line 37

def version=(value)
  @version = value
end

Instance Method Details

#getAppIdObject



50
51
52
# File 'lib/appengine-apis/testing.rb', line 50

def getAppId
  @appid
end

#getAttributesObject



86
87
88
# File 'lib/appengine-apis/testing.rb', line 86

def getAttributes
  @attributes
end

#getAuthDomainObject



70
71
72
# File 'lib/appengine-apis/testing.rb', line 70

def getAuthDomain
  @auth_domain
end

#getDefaultNamespaceObject



78
79
80
# File 'lib/appengine-apis/testing.rb', line 78

def getDefaultNamespace
  @default_namespace
end

#getEmailObject



58
59
60
# File 'lib/appengine-apis/testing.rb', line 58

def getEmail
  @email
end

#getRequestNamespaceObject



74
75
76
# File 'lib/appengine-apis/testing.rb', line 74

def getRequestNamespace
  @request_namespace
end

#getVersionIdObject



54
55
56
# File 'lib/appengine-apis/testing.rb', line 54

def getVersionId
  @version
end

#inspectObject



90
91
92
# File 'lib/appengine-apis/testing.rb', line 90

def inspect
  "#<TestEnv>"
end

#isAdminObject



66
67
68
# File 'lib/appengine-apis/testing.rb', line 66

def isAdmin
  !!@admin
end

#isLoggedInObject



62
63
64
# File 'lib/appengine-apis/testing.rb', line 62

def isLoggedIn
  !(@email.nil? || @auth_domain.nil? || @email.empty?)
end

#setDefaultNamespace(s) ⇒ Object



82
83
84
# File 'lib/appengine-apis/testing.rb', line 82

def setDefaultNamespace(s)
  @default_namespace = s
end