-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from Azure/develop
Develop to master
- Loading branch information
Showing
17 changed files
with
6,385 additions
and
9 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Any raw assets you want to be deployed with your application can be placed in | ||
this directory (and child directories) and given a Build Action of "AndroidAsset". | ||
|
||
These files will be deployed with you package and will be accessible using Android's | ||
AssetManager, like this: | ||
|
||
public class ReadAsset : Activity | ||
{ | ||
protected override void OnCreate (Bundle bundle) | ||
{ | ||
base.OnCreate (bundle); | ||
|
||
InputStream input = Assets.Open ("my_asset.txt"); | ||
} | ||
} | ||
|
||
Additionally, some Android functions will automatically load asset files: | ||
|
||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); |
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,4 @@ | ||
<GettingStarted> | ||
<LocalContent>GS\Android\CS\AndroidApp\GettingStarted.html</LocalContent> | ||
<EmbeddedNavigation>false</EmbeddedNavigation> | ||
</GettingStarted> |
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,43 @@ | ||
using System; | ||
using System.Reflection; | ||
using Android.App; | ||
using Android.Content; | ||
using Android.Runtime; | ||
using Android.Views; | ||
using Android.Widget; | ||
using Android.OS; | ||
|
||
using Xunit.Sdk; | ||
using Xunit.Runners.UI; | ||
|
||
namespace Test.Microsoft.Amqp.Android | ||
{ | ||
[Activity(Label = "xUnit Android Runner", MainLauncher = true, Theme= "@android:style/Theme.Material.Light")] | ||
public class MainActivity : RunnerActivity | ||
{ | ||
|
||
protected override void OnCreate(Bundle bundle) | ||
{ | ||
// tests can be inside the main assembly | ||
AddTestAssembly(Assembly.GetExecutingAssembly()); | ||
|
||
AddExecutionAssembly(typeof(ExtensibilityPointFactory).Assembly); | ||
// or in any reference assemblies | ||
|
||
//AddTestAssembly(typeof(PortableTests).Assembly); | ||
// or in any assembly that you load (since JIT is available) | ||
|
||
#if false | ||
// you can use the default or set your own custom writer (e.g. save to web site and tweet it ;-) | ||
Writer = new TcpTextWriter ("10.0.1.2", 16384); | ||
// start running the test suites as soon as the application is loaded | ||
AutoStart = true; | ||
// crash the application (to ensure it's ended) and return to springboard | ||
TerminateAfterExecution = true; | ||
#endif | ||
// you cannot add more assemblies once calling base | ||
base.OnCreate(bundle); | ||
} | ||
} | ||
} | ||
|
9 changes: 9 additions & 0 deletions
9
test/Test.Microsoft.Amqp.Android/Properties/AndroidManifest.xml
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="Test.Microsoft.Amqp.Android.Test.Microsoft.Amqp.Android" | ||
android:versionCode="1" | ||
android:versionName="1.0"> | ||
<uses-sdk android:minSdkVersion="21" /> | ||
<application android:allowBackup="true" android:label="@string/app_name"> | ||
</application> | ||
</manifest> |
30 changes: 30 additions & 0 deletions
30
test/Test.Microsoft.Amqp.Android/Properties/AssemblyInfo.cs
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,30 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
using Android.App; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("Test.Microsoft.Amqp.Android")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("Test.Microsoft.Amqp.Android")] | ||
[assembly: AssemblyCopyright("Copyright © 2017")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
[assembly: ComVisible(false)] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
44 changes: 44 additions & 0 deletions
44
test/Test.Microsoft.Amqp.Android/Resources/AboutResources.txt
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,44 @@ | ||
Images, layout descriptions, binary blobs and string dictionaries can be included | ||
in your application as resource files. Various Android APIs are designed to | ||
operate on the resource IDs instead of dealing with images, strings or binary blobs | ||
directly. | ||
|
||
For example, a sample Android app that contains a user interface layout (main.axml), | ||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) | ||
would keep its resources in the "Resources" directory of the application: | ||
|
||
Resources/ | ||
drawable/ | ||
icon.png | ||
|
||
layout/ | ||
main.axml | ||
|
||
values/ | ||
strings.xml | ||
|
||
In order to get the build system to recognize Android resources, set the build action to | ||
"AndroidResource". The native Android APIs do not operate directly with filenames, but | ||
instead operate on resource IDs. When you compile an Android application that uses resources, | ||
the build system will package the resources for distribution and generate a class called "R" | ||
(this is an Android convention) that contains the tokens for each one of the resources | ||
included. For example, for the above Resources layout, this is what the R class would expose: | ||
|
||
public class R { | ||
public class drawable { | ||
public const int icon = 0x123; | ||
} | ||
|
||
public class layout { | ||
public const int main = 0x456; | ||
} | ||
|
||
public class strings { | ||
public const int first_string = 0xabc; | ||
public const int second_string = 0xbcd; | ||
} | ||
} | ||
|
||
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main | ||
to reference the layout/main.axml file, or R.strings.first_string to reference the first | ||
string in the dictionary file values/strings.xml. |
Oops, something went wrong.