-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
starting integration tests and updating dependencies.
- Loading branch information
1 parent
4485dbf
commit 44e663a
Showing
161 changed files
with
156 additions
and
59,772 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
using System; | ||
using NUnit.Framework; | ||
using KinveyXamarin; | ||
using System.Reflection; | ||
using RestSharp; | ||
using LinqExtender; | ||
|
||
namespace AndroidLibtester | ||
{ | ||
[TestFixture] | ||
public class TestIntAppData | ||
{ | ||
|
||
private string kid = "kid_-yHYO8aYY"; | ||
private string secret = "4c2f4856a6c54573b9fccd05c293a58e"; | ||
private string collection = "TestData"; | ||
private string someID = "test"; | ||
|
||
private Client client; | ||
private AsyncAppData<MyEntity> appData; | ||
|
||
[SetUp] | ||
public void Setup () | ||
{ | ||
client = new Client.Builder (kid, secret).build (); | ||
appData = client.AppData<MyEntity> (collection, typeof(MyEntity)); | ||
|
||
} | ||
|
||
|
||
[Test()] | ||
public async void TestSaveEntity() | ||
{ | ||
MyEntity ent = new MyEntity (); | ||
ent.Email = "[email protected]"; | ||
ent.IsAvailable = true; | ||
ent.lowercasetest = "UpperCase"; | ||
ent.Name = "James Dean"; | ||
|
||
MyEntity saved = await appData.SaveAsync (ent); | ||
|
||
Assert.Equals (ent.Name, saved.Name); | ||
Assert.Equals (ent.lowercasetest, saved.lowercasetest); | ||
Assert.Equals (ent.IsAvailable, saved.IsAvailable); | ||
Assert.Equals (ent.Email, saved.Email); | ||
} | ||
|
||
[Test()] | ||
public async void TestGetEntity(){ | ||
await appData.SaveAsync (new MyEntity (someID)); | ||
|
||
MyEntity ret = await appData.GetEntityAsync (someID); | ||
|
||
Assert.Equals (ret.ID, someID); | ||
|
||
} | ||
|
||
|
||
|
||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.