Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

Commit

Permalink
[client][managed][offline] minor rename in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hasankhan committed Sep 29, 2014
1 parent 0024114 commit 8f8edb8
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.WindowsAzure.MobileServices.Test
{
class MobileServiceLocalStoreMock: IMobileServiceLocalStore
{
public readonly Dictionary<string, MockTable> Tables = new Dictionary<string, MockTable>();
public readonly Dictionary<string, MockTable> TableMap = new Dictionary<string, MockTable>();

public List<MobileServiceTableQueryDescription> ReadQueries { get; private set; }
public List<MobileServiceTableQueryDescription> DeleteQueries { get; private set; }
Expand Down Expand Up @@ -88,7 +88,7 @@ public Task<JToken> ReadAsync(MobileServiceTableQueryDescription query)
public Task DeleteAsync(MobileServiceTableQueryDescription query)
{
this.DeleteQueries.Add(query);
this.Tables[query.TableName].Clear();
this.TableMap[query.TableName].Clear();
return Task.FromResult(0);
}

Expand Down Expand Up @@ -123,9 +123,9 @@ public Task<JObject> LookupAsync(string tableName, string id)
private Dictionary<string, JObject> GetTable(string tableName)
{
MockTable table;
if (!this.Tables.TryGetValue(tableName, out table))
if (!this.TableMap.TryGetValue(tableName, out table))
{
this.Tables[tableName] = table = new MockTable();
this.TableMap[tableName] = table = new MockTable();
}
return table;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public async Task CancelAndUpdateItemAsync_UpsertsTheItemInLocalStoreAndDeletesT
string itemId = "def";
string tableName = "test";

store.Tables[MobileServiceLocalSystemTables.OperationQueue].Add(operationId, new JObject());
store.TableMap[MobileServiceLocalSystemTables.OperationQueue].Add(operationId, new JObject());

// operation exists before cancel
Assert.IsNotNull(await store.LookupAsync(MobileServiceLocalSystemTables.OperationQueue, operationId));
Expand Down Expand Up @@ -230,8 +230,8 @@ public async Task CancelAndDiscardItemAsync_DeletesTheItemInLocalStoreAndDeletes
string itemId = "def";
string tableName = "test";

store.Tables[MobileServiceLocalSystemTables.OperationQueue].Add(operationId, new JObject());
store.Tables.Add(tableName, new Dictionary<string, JObject>() { { itemId, new JObject() } });
store.TableMap[MobileServiceLocalSystemTables.OperationQueue].Add(operationId, new JObject());
store.TableMap.Add(tableName, new Dictionary<string, JObject>() { { itemId, new JObject() } });

// operation exists before cancel
Assert.IsNotNull(await store.LookupAsync(MobileServiceLocalSystemTables.OperationQueue, operationId));
Expand Down Expand Up @@ -294,7 +294,7 @@ private async Task TestOperationModifiedException(bool operationExists, Func<Mob

if (operationExists)
{
store.Tables[MobileServiceLocalSystemTables.OperationQueue].Add(operationId, new JObject() { { "version", 3 } });
store.TableMap[MobileServiceLocalSystemTables.OperationQueue].Add(operationId, new JObject() { { "version", 3 } });
}
else
{
Expand Down
Loading

0 comments on commit 8f8edb8

Please sign in to comment.