Class TestCase
TestCase messages provide the request context and an expectation as to whether the given context will be
allowed or denied. Test cases may specify the request, resource, and function_mocks to mock a function
call to a service-provided function. The request object represents context present at request-time. The
resource is the value of the target resource as it appears in persistent storage before the request is
executed.
Implements
Inherited Members
Namespace: Google.Apis.FirebaseRules.v1.Data
Assembly: Google.Apis.FirebaseRules.v1.dll
Syntax
public class TestCase : IDirectResponseSchema
Properties
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Expectation
Test expectation.
Declaration
[JsonProperty("expectation")]
public virtual string Expectation { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ExpressionReportLevel
Specifies what should be included in the response.
Declaration
[JsonProperty("expressionReportLevel")]
public virtual string ExpressionReportLevel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
FunctionMocks
Optional function mocks for service-defined functions. If not set, any service defined function is expected to return an error, which may or may not influence the test outcome.
Declaration
[JsonProperty("functionMocks")]
public virtual IList<FunctionMock> FunctionMocks { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<FunctionMock> |
PathEncoding
Specifies whether paths (such as request.path) are encoded and how.
Declaration
[JsonProperty("pathEncoding")]
public virtual string PathEncoding { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Request
Request context. The exact format of the request context is service-dependent. See the appropriate service
documentation for information about the supported fields and types on the request. Minimally, all services
support the following fields and types: Request field | Type ---------------|----------------- auth.uid |
string auth.token | map headers | map method | string params | map path | string time |
google.protobuf.Timestamp If the request value is not well-formed for the service, the request will be
rejected as an invalid argument.
Declaration
[JsonProperty("request")]
public virtual object Request { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
Resource
Optional resource value as it appears in persistent storage before the request is fulfilled. The resource
type depends on the request.path value.
Declaration
[JsonProperty("resource")]
public virtual object Resource { get; set; }
Property Value
| Type | Description |
|---|---|
| object |