Permalink
Browse files

initial commit

  • Loading branch information...
1 parent d931f26 commit fddc607f5d09dc0496a6c8bb06f94b88c463f93d Daniel Lewis committed Sep 14, 2012
Showing with 78,110 additions and 0 deletions.
  1. +67 −0 Apigee.Net.Tests/Apigee.Net.Tests.csproj
  2. +96 −0 Apigee.Net.Tests/ApigeeClientTests/ClientTests.cs
  3. +36 −0 Apigee.Net.Tests/Properties/AssemblyInfo.cs
  4. BIN Apigee.Net.Tests/bin/Debug/Apigee.Net.Tests.dll
  5. BIN Apigee.Net.Tests/bin/Debug/Apigee.Net.Tests.pdb
  6. BIN Apigee.Net.Tests/bin/Debug/Apigee.Net.dll
  7. BIN Apigee.Net.Tests/bin/Debug/Apigee.Net.pdb
  8. BIN Apigee.Net.Tests/bin/Debug/Krystalware.UploadHelper.dll
  9. BIN Apigee.Net.Tests/bin/Debug/Krystalware.UploadHelper.pdb
  10. BIN Apigee.Net.Tests/bin/Debug/Newtonsoft.Json.dll
  11. +7,634 −0 Apigee.Net.Tests/bin/Debug/Newtonsoft.Json.xml
  12. BIN Apigee.Net.Tests/bin/Debug/fastJSON.dll
  13. BIN Apigee.Net.Tests/bin/Debug/fastJSON.pdb
  14. BIN Apigee.Net.Tests/bin/Debug/nunit.framework.dll
  15. +10,845 −0 Apigee.Net.Tests/bin/Debug/nunit.framework.xml
  16. BIN Apigee.Net.Tests/bin/Debug/nunit.mocks.dll
  17. +17 −0 Apigee.Net.Tests/obj/Debug/Apigee.Net.Tests.csproj.FileListAbsolute.txt
  18. BIN Apigee.Net.Tests/obj/Debug/Apigee.Net.Tests.csprojResolveAssemblyReference.cache
  19. BIN Apigee.Net.Tests/obj/Debug/Apigee.Net.Tests.dll
  20. BIN Apigee.Net.Tests/obj/Debug/Apigee.Net.Tests.pdb
  21. BIN Apigee.Net.Tests/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  22. 0 Apigee.Net.Tests/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
  23. 0 Apigee.Net.Tests/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
  24. 0 Apigee.Net.Tests/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
  25. +26 −0 Apigee.Net.sln
  26. BIN Apigee.Net.v11.suo
  27. +68 −0 Apigee.Net/Apigee.Net.csproj
  28. +6 −0 Apigee.Net/Apigee.Net.csproj.user
  29. +157 −0 Apigee.Net/ApigeeClient.cs
  30. +7 −0 Apigee.Net/Models/ApiResponse/CreateApigeeAccountResponse.cs
  31. +18 −0 Apigee.Net/Models/UserModel.cs
  32. +187 −0 Apigee.Net/Networking/HttpTools.cs
  33. +36 −0 Apigee.Net/Properties/AssemblyInfo.cs
  34. BIN Apigee.Net/bin/Debug/Apigee.Net.dll
  35. BIN Apigee.Net/bin/Debug/Apigee.Net.pdb
  36. BIN Apigee.Net/bin/Debug/Krystalware.UploadHelper.dll
  37. BIN Apigee.Net/bin/Debug/Krystalware.UploadHelper.pdb
  38. BIN Apigee.Net/bin/Debug/Newtonsoft.Json.dll
  39. +7,634 −0 Apigee.Net/bin/Debug/Newtonsoft.Json.xml
  40. BIN Apigee.Net/bin/Debug/fastJSON.dll
  41. BIN Apigee.Net/bin/Debug/fastJSON.pdb
  42. +12 −0 Apigee.Net/obj/Debug/Apigee.Net.csproj.FileListAbsolute.txt
  43. BIN Apigee.Net/obj/Debug/Apigee.Net.csprojResolveAssemblyReference.cache
  44. BIN Apigee.Net/obj/Debug/Apigee.Net.dll
  45. BIN Apigee.Net/obj/Debug/Apigee.Net.pdb
  46. BIN Apigee.Net/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  47. 0 Apigee.Net/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
  48. 0 Apigee.Net/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
  49. 0 Apigee.Net/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
  50. +4 −0 Apigee.Net/packages.config
  51. BIN packages/Newtonsoft.Json.4.5.9/Newtonsoft.Json.4.5.9.nupkg
  52. BIN packages/Newtonsoft.Json.4.5.9/lib/net20/Newtonsoft.Json.dll
  53. +8,255 −0 packages/Newtonsoft.Json.4.5.9/lib/net20/Newtonsoft.Json.xml
  54. BIN packages/Newtonsoft.Json.4.5.9/lib/net35/Newtonsoft.Json.dll
  55. +7,391 −0 packages/Newtonsoft.Json.4.5.9/lib/net35/Newtonsoft.Json.xml
  56. BIN packages/Newtonsoft.Json.4.5.9/lib/net40/Newtonsoft.Json.dll
  57. +7,634 −0 packages/Newtonsoft.Json.4.5.9/lib/net40/Newtonsoft.Json.xml
  58. BIN packages/Newtonsoft.Json.4.5.9/lib/sl3-wp/Newtonsoft.Json.dll
  59. +6,934 −0 packages/Newtonsoft.Json.4.5.9/lib/sl3-wp/Newtonsoft.Json.xml
  60. BIN packages/Newtonsoft.Json.4.5.9/lib/sl4-windowsphone71/Newtonsoft.Json.dll
  61. +6,934 −0 packages/Newtonsoft.Json.4.5.9/lib/sl4-windowsphone71/Newtonsoft.Json.xml
  62. BIN packages/Newtonsoft.Json.4.5.9/lib/sl4/Newtonsoft.Json.dll
  63. +6,956 −0 packages/Newtonsoft.Json.4.5.9/lib/sl4/Newtonsoft.Json.xml
  64. BIN packages/Newtonsoft.Json.4.5.9/lib/winrt45/Newtonsoft.Json.dll
  65. +7,152 −0 packages/Newtonsoft.Json.4.5.9/lib/winrt45/Newtonsoft.Json.xml
  66. BIN packages/UploadHelper/Krystalware.UploadHelper.dll
  67. BIN packages/UploadHelper/Krystalware.UploadHelper.pdb
  68. BIN packages/fastJSON v2.0.2/fastJSON.dll
  69. BIN packages/fastJSON v2.0.2/fastJSON.pdb
  70. +4 −0 packages/repositories.config
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{2D2A671F-A362-4A43-B848-D265C0CF7201}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Apigee.Net.Tests</RootNamespace>
+ <AssemblyName>Apigee.Net.Tests</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="nunit.framework, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\Program Files (x86)\NUnit 2.6\bin\framework\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.mocks, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\Program Files (x86)\NUnit 2.6\bin\framework\nunit.mocks.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ApigeeClientTests\ClientTests.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Apigee.Net\Apigee.Net.csproj">
+ <Project>{f83a4ff7-a1ca-4f17-8cec-60b7684220dc}</Project>
+ <Name>Apigee.Net</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
@@ -0,0 +1,96 @@
+using Apigee.Net.Models;
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Apigee.Net.Tests.ApigeeClientTests
+{
+ public class ClientTests
+ {
+ ApigeeClient aClient = new ApigeeClient("http://api.usergrid.com/sympletech1/sandbox/");
+
+ [Test]
+ public void GetUsersTest()
+ {
+ var results = aClient.GetUsers();
+ Assert.IsNotNull(results);
+ }
+
+ [Test]
+ public void CreateAccountTest()
+ {
+ string un = "apigee_" + Guid.NewGuid();
+ var result = aClient.CreateAccount(new UserModel {
+ Username = un,
+ Password = "abc123",
+ Email = un + "@sympletech.com"
+ });
+
+ Assert.IsNotEmpty(result.Uuid);
+ }
+
+ [Test]
+ public void UpdateAccountTest()
+ {
+ string un = "bobby";
+ var result = aClient.UpdateAccount(new UserModel
+ {
+ Username = un,
+ Password = "abc123",
+ Email = un + "@sympletech.com"
+ });
+ }
+
+
+ [Test]
+ public void GetTokenTest()
+ {
+ var result = aClient.GetToken("apigee_58461c11-6632-4980-9130-cb43fc5d0dc6", "abc123");
+ Assert.IsNotNull(result);
+ }
+
+ [Test]
+ public void LookUpTokenTest()
+ {
+ var result = aClient.LookUpToken("");
+ Assert.IsNotNull(result);
+ }
+
+
+
+ public static void temp()
+ {
+ ApigeeClient apiClient = new ApigeeClient("http://api.usergrid.com/xxx/sandbox/");
+
+ //Get a collection of all users
+ var allUsers = apiClient.GetUsers();
+
+ string un = "apigee_" + Guid.NewGuid();
+
+ //Create a new Account
+ apiClient.CreateAccount(new UserModel
+ {
+ Username = un,
+ Password = "abc123",
+ Email = un + "@sympletech.com"
+ });
+
+ //Update an Existing Account
+ apiClient.UpdateAccount(new UserModel
+ {
+ Username = un,
+ Password = "abc123456",
+ Email = un + "@sympletech.com"
+ });
+
+ //Login User - Get Token
+ var token = apiClient.GetToken(un, "abc123456");
+
+ //Lookup a user by token ID
+ var username = apiClient.LookUpToken(token);
+ }
+ }
+}
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 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("Apigee.Net.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Apigee.Net.Tests")]
+[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("90782e30-179e-4635-936c-74e0b1b4a7c5")]
+
+// 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")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit fddc607

Please sign in to comment.