GetCommandersByQuery throws if username is not specified
TryCanonicalize fails if the supplied key contains a bad character.
Throws (400) if a title is not provided when sharing.
GetShareStatus returns status for a known token.
RevokeKey marks an unused key as such.
GetProductRegistration_ById - returns the product info
CreateProductKeyBatch creates a new product key batch entity.
RegisterKey registers the unused product key for the user
Data can be round-tripped through hexadecimal conversion.
Tests search by lastname starts with
GetProductKeyCategories - tests the mapping of ProductKeyCategory Entities to ProductKeyCategoryInfoCollection
RegisterKey doesn't change the expiration date if registration is repeated.
A request with a bad nonce gets a 401.
TryCanonicalize converts to upper case.
Presence doesn't update OnlineStatusChanged if available hasn't changed
GetCustomerDetailInfo throws if not found
Eventually fails with too many IOExceptions.
Round-trips objects.
GetShareStatus removes the status object when the share is completed.
DeleteFile deletes a file at the specified location.
CustomResultCodeString is formatted correctly for a known code.
Getting the Length throws if the header chunk doesn't exist within the timeout.
Successive calls to generate create different keys.
Tests mac address
Data can be round-tripped through encryption and decryption.
UpdateSupportUser updates the role for a support manager
Data can be round-tripped through encryption and decryption using the base 64 variations.
Tests exact email
Calls auth service using the userid without throwing.
Calling add element with a null parent never invokes the action and returns null
TryCanonicalize removes dashes.
End User name is used when the device user is used
GetQueryIndexParam throws if invalid
Sets a pending status when sharing is started.
UpdateSupportUser updates the role for a support admin
CreateOrUpdateCommander throws if id is bad
GetKeyInfo throws if the specified key is malformed.
Throws and exception if the siteid in the resource uri is bad
Includes the user name part of saved credentials if they exist.
An 'X-Authorization' header is also acceptable.
ShareToYouTube throws (404) if the MAC address doesn't refer to a known camera.
RegisterKey throws if the key is registered to a different user
The stream encapsulates multiple chunks as a single stream.
Send maps ServiceUnavailablePacketException to HTTP 503.
Send maps other stream exceptions to HTTP 500.
User name is used when the username is an end user
CreateFile creates a file at the specified location.
CreateFile overwrites any file at the specified location.
ShouldWrapMessage is false when the request header is not there.
RevokeKey throws if the specified key is not in the database.
The camera service throws (503) for an offline camera.
FileExists waits for the second file to exist before returning (it shows up later).
The body chunk is written corectly on an upload where the body is smaller than the buffer size.
ShareToYouTube throws (400) if the MAC address is not specified.
Tests no results lastname
Is resilient to IOExceptions.
Download correctly parses the file name for content-disposition even when the query string is complex.
Send maps other XMPP exceptions to HTTP 500.
A request with an incorrect password digest gets a 401.
ShouldWrapMessage false with non-boolean value
RevokeKey throws if the specified key is malformed.
Can update existing credentials for the current user.
Fills in key words if none are provided when sharing.
MergeEnumerable can enumerate a multiple sorted IEnumerable in sorted order.
Sanitizes keys for use as file names.
Upload fails if the content-length header value is zero.
Send maps other packet exceptions to HTTP 500.
Doesn't include the user name part of saved credentials if they don't exist.
ShareToYouTube submits the specified clip from the camera (when not available from storage) and returns status.
Download may include a content-disposition header if requested.
GetNextStream stops before the timeout if the EOF appears.
Presence updates OnlineStatusChanged if available has changed
This validates the helper method that gets the current trial registration from a list of registrations.
Send maps ItemNotFoundPacketException to HTTP 404.
Download responds with Not Found (HTTP 404) if the requested file doesn't exist within the timeout.
Throws (401) if credentials are not provided and there aren't saved credentials.
DeleteFile doesn't throw deleting a non-existent file.
Tests updating a site
Tests that only the owner of the site can delete it
GetQueryPageSizeParam throws if invalid
The header chunk is written correctly on an upload.
Retrieves the list of YouTube categories from YouTube if not available in the cache.
GetCommandersByQuery throws if username is not specified
MergeEnumerable can enumerate a single IEnumerable correctly.
GetQueryPageSizeParam throws if invalid
The camera service throws (404) for an unknown MAC.
Optional internal IP address is set when a camera is created.
ShareToYouTube throws (400) if the MAC address is invalid.
GetClip throws (404) if the MAC address doesn't refer to a known camera.
GetClip throws (503) if the clip needs to come from the camera, but the camera is offline.
Only PUT, POST and GET are allowed.
The camera service throws (503) if the camera is not available when the XMPP is sent.
RegisterKey throws if the supplied keys is malformed.
The body chunk is written corectly on an upload where the body is larger than the buffer size.
Send maps TimeoutException to HTTP 408.
Stores objects on Put.
A request with a bad nonce gets a 401.
TryCanonicalize removes white space.
Send maps FeatureNotImplementedPacketException to HTTP 501.
Validates that the latest unconfirmed and expired product is returned.
Tests search by full name exact
Calling add element returns the added node
End User name is used when the device user is used
CreateProductKeyBatch generates the right number of keys.
RegisterKey throws if the supplied user is not in the database.
CustomResultCodeString is formatted correctly for an unknown code.
RevokeKey cancels the associated product registration if the key has been used.
Download treats the save as file name as optional.
A stream can be created even if directories don't exist.
GetProductKeyBatches - throws if batch not found
GetClip redirects to the correct host when the hostOverride parameter is included.
Can delete existing credentials for the current user.
Saves the user's credentials (with password encrypted) if told to when sharing.
UpdateSupportUser throws if location not found
Tests
FileExists waits for the second file to exist before returning (it already exists).
Assertion about behavior
Validates that the correct activation date is returned when there are multiple product keys queued up.
Tests starts with email
Send DOES NOT map non-XMPP exceptions.
TryCanonicalize fails if the supplied key contains a bad character, even if the length comes out right.
AuthenticateCurrentRequest throws an exception 401 in response to a request without authentication.
Assertion about behavior
The camera service throws (400) for a bad MAC.
Appends a marketing tag to the description when sharing.
GetProductRegistration - throws if the guid is invalid
GetKeyInfoForBatchCsv throws if a batch ID is not found.
A request with a bad nonce gets a 401.
Optional site is set when a camera is created.
Presence can't be updated for a non-existing camera.
Can load existing credentials for the current user.
GetProducts - tests the mapping of Product Entities to ProductInfoCollection
CreateOrUpdateCommander throws if id is bad
The camera service throws (404) for an unknown MAC.
GetProductRegistrationByUser - returns all products for the user
An existing camera can be updated with new values.
Send extracts the custom result data (if any) to the exception's CustomResultData property.
RevokeKey doesn't overwrite the cancel date for a registration if it was already canceled.
TryCanonicalize fails if the supplied key is too short.
UpdateSupportUser update location
GetProductRegistration_NotFound - throws for productregistration not found
UpdateSupportUser removes the user from all support roles.
Tests deletion of a site
Send maps ForbiddenPacketException to HTTP 403.
A request with a bad nonce gets a 401.
TryCanonicalize fails if the supplied key is too long.
GetProductKeyBatches returns a single batch when a batch ID is specified.
ShareToYouTube submits the specified clip from storage (when available) and returns status.
GetCommanderByID_Found
ToEntity gets an existing entity if the id's match and updates the name
Throws and exeption if the resourceid doesn't match the PUT data
GetKetInfo returns registration detail information about a used key.
AuthenticateCurrentRequest adds the WWW-Authenticate header in response to a request without authentication.
A request with an unknown user gets a 401.
A path can't go outside of the storage's base path by using parent.
Validates that only the active product is selected.
The country calculated from the IP address is automatically updated on any camera update.
Tests
The EOF chunk is written correctly on an upload.
MergeEnumerable eliminates duplicates.
Send throws if the result type is not what is expected.
CreateOrUpdateCommander throws if id is bad
An empty userName throw an ArgumentException
UpdateSupportUser updates the role for a support tech
GetClip successfully retrieves the specified clip from the camera (when not available from storage) and redirects.
The stream Length comes from the header chunk.
A null userName throw an ArgumentException
CreateProductKeyBatch throws if the specified product ID is invalid.
CreateProductKeyBatch throws if the specified product key category ID is invalid.
Download can stream a previously uploaded file.
CreateOrUpdateCommander throws if id is bad
ParseDirectives parses the directives out of an Authorization header.
Calling add element with a null parent results in a null result
The camera service can retrieve PTZ for a camera.
Send extracts the custom result code (if any) to the exception's CustomResultCode property.
Retrieves the list of YouTube categories from the cache if available.
ToEntity gets a new site when the id's don't match
Can save new credentials for the current user.
Ensures that a site is properly mapped to a SiteInfo
Tests search by product key
Upload fails if the content-type header value is missing.
ShareToYouTube throws (400) if the media id address is not specified.
ShouldWrapMessage is false when the request header is there but has a value of false
GetKeyInfoForBatchCsv gets all the keys for the specified batch.
GetShareStatus throws (404) for an unknown status token.
Validates that only active products are returned.
Validates that the latest unconfirmed and cancelled product is returned.
FormatForDisplay adds helpful group dashes.
Throws and exception if the siteid in the resource uri is bad
Validates that only the active product is selected.
The camera service can update PTZ for a camera.
GetProductRegistrationByUser - throws if user is not found
Upload works with PUT as well as POST.
An expired nonce results in 401.
ShareToYouTube strips any request query parameters when building the status location URL.
WebProtocolException is thrown when the site is not found
Append appends and returns the new node
Upload reports success (HTTP 201) when successful.
GetKeyInfo throws if the specified key is not in the database.
GetProductKeyBatches returns all batches when a batch ID is NOT specified.
FileExists times out if the second file doesn't exist in time.
The camera service throws (400) for a bad MAC.
The camera service throws (503) for an offline camera.
Calling add element with an action returns the parent node
Is OK to delete non-existent credentials (no exception thrown or anything).
A path can't go outside of the storage's base path by starting with slash.
AuthenticateCurrentRequest throws an exception 400 for non 'Digest' authorization.
ShareToYouTube throws (503) if the clip needs to come from the camera, but the camera is offline.
GetQueryIndexParam throws if invalid
A new firmware history entry is NOT created if the firmware version is the same.
GetKetInfo returns detail information about an unused key.
The camera's site is created if it doesn't exist.
GetClip throws (400) if the MAC address is not specified.
Generate creates a product key of the expected length.
CreateOrUpdateCommander throws if empty argument
Uses saved credentials if none are provided.
GetClip indirectly retrieves the clip from the camera if an upload destination is supplied.
Validates that today is returned if there are no active products.
A new firmware history entry is created if the firmware version is different.
GetClip throws (400) if the media id address is not specified.
Validates that the correct activation date is returned when there is a single active product
GetCommandersByQuery throws if username is not specified
ParseDirectives throws an exception 400 if a required directive is missing.
GetKeyInfoForBatchCsv throws if a batch ID is not specified.
GetClip throws (400) if the MAC address is invalid.
Send maps BadRequestPacketException to HTTP 400.
Tests search by full starts with
Removes objects when requested.
GetClip successfully retrieves the specified clip from storage (when available) and redirects.
Fills in a default category if none is provided when sharing.
RegisterKey throws if the supplied keys is not in the database.
ShouldWrapMessage is true when the request header is there.
A request with a correct password digest is authenticated.
Updating a non-existent camera creates a new one.