Skip to content

Commit

Permalink
Add circlCI files and delete src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
bugthesystem committed Jan 19, 2015
1 parent 77847ee commit 03caa1e
Show file tree
Hide file tree
Showing 64 changed files with 2,620 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .c9/.nakignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*~backup-*
.c9revisions
.c9
.git
.svn
.DS_Store
.bzr
.cdv
~.dep
~.dot
~.nib
~.plst
.hg
.pc
*.min.js
.nakignore
/dev
1 change: 1 addition & 0 deletions .c9/metadata/tab0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"filter":false,"title":"bash - \"ziyasal-firesharp-1226383\"","tooltip":"bash - \"ziyasal-firesharp-1226383\"","undoManager":{"mark":0,"position":-1,"stack":[]},"terminal":{"id":"ziyasal@firesharp_829","cwd":"","width":916,"height":127,"scrollTop":899},"timestamp":1421695510688,"hash":"da39a3ee5e6b4b0d3255bfef95601890afd80709"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"filter":false,"title":"FiresharpTestBase.cs","tooltip":"/FireSharp.Tests/FiresharpTestBase.cs","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":0,"column":0},"end":{"row":0,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1421695821516,"hash":"7de76223c39d83ef93c4dbed4dc69d4d5d8d8674"}
1 change: 1 addition & 0 deletions .c9/metadata/workspace/build.sh

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .c9/metadata/workspace/circle.yml

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions .c9/project.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"ace": {
"@guessTabSize": "true",
"@newLineMode": "unix",
"@tabSize": "4",
"@useSoftTabs": "true"
},
"build": {
"@builder": "auto",
"@path": "/.c9/builders",
"@saveall": "true"
},
"find.nak": {
"@searchLimit": 100
},
"language": {
"@instanceHighlight": "true",
"@semi": "true",
"@undeclaredVars": "true",
"@unusedFunctionArgs": "false",
"@warnLevel": "info"
},
"run": {
"@path": "/.c9/runners",
"configs": {
"@inited": "true",
"json()": {}
}
},
"share": {
"@app": false,
"@preview": false,
"@useOwnerSettings": false
}
}
6 changes: 6 additions & 0 deletions FireSharp.Test.Console/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
</startup>
</configuration>
88 changes: 88 additions & 0 deletions FireSharp.Test.Console/FireSharp.Test.Console.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.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>{0DF0042E-769D-409B-A9F7-19449FD0AFD0}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FireSharp.Test.Console</RootNamespace>
<AssemblyName>FireSharp.Test.Console</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Extensions">
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Primitives">
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<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="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FireSharp\FireSharp.csproj">
<Project>{7613B723-E81B-4C02-A3EC-54F8F02C60F6}</Project>
<Name>FireSharp</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
</Target>
<!-- 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>
28 changes: 28 additions & 0 deletions FireSharp.Test.Console/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using FireSharp.Config;

namespace FireSharp.Test.Console
{
public class Program
{
private static FirebaseClient _client;
protected const string BASE_PATH = "https://firesharp.firebaseio.com/";
protected const string FIREBASE_SECRET = "fubr9j2Kany9KU3SHCIHBLm142anWCzvlBs1D977";
static void Main()
{
IFirebaseConfig config = new FirebaseConfig
{
AuthSecret = FIREBASE_SECRET,
BasePath = BASE_PATH
};

_client = new FirebaseClient(config); //Uses RestSharp JsonSerializer as default

_client.Listen("chat", added: (sender, args) =>
{
System.Console.WriteLine(args.Data);
});

System.Console.Read();
}
}
}
36 changes: 36 additions & 0 deletions FireSharp.Test.Console/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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("FireSharp.Test.Console")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FireSharp.Test.Console")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[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("36e73638-c60a-48e8-a807-e705468013a1")]

// 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")]
6 changes: 6 additions & 0 deletions FireSharp.Test.Console/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net451" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net451" />
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net451" />
</packages>
15 changes: 15 additions & 0 deletions FireSharp.Tests/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Moq"
publicKeyToken="69f491c39445e920"
culture="neutral" />
<bindingRedirect oldVersion="4.0.812.4"
newVersion="4.1.1309.1617" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
98 changes: 98 additions & 0 deletions FireSharp.Tests/FireSharp.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?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>{F7C691EB-249D-48D7-BE52-DF33C55B1F96}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FireSharp.Tests</RootNamespace>
<AssemblyName>FireSharp.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</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="Moq, Version=4.2.1408.717, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Moq.4.2.1408.0717\lib\net40\Moq.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Ploeh.AutoFixture, Version=3.20.0.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\AutoFixture.3.20.0\lib\net40\Ploeh.AutoFixture.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Extensions">
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Primitives">
<HintPath>..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Runtime.Serialization" />
<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="FiresharpTests.cs" />
<Compile Include="FirebaseClientTests.cs" />
<Compile Include="FirebaseClientTests.async.cs" />
<Compile Include="FiresharpTestBase.cs" />
<Compile Include="Models\Todo.cs" />
<Compile Include="TestBase.cs" />
<Compile Include="MoqExtensions\MoqExtensions.cs" />
<Compile Include="NunitExtensions\AssertExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FireSharp\FireSharp.csproj">
<Project>{7613B723-E81B-4C02-A3EC-54F8F02C60F6}</Project>
<Name>FireSharp</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
</Target>
<!-- 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>
32 changes: 32 additions & 0 deletions FireSharp.Tests/FirebaseClientTests.async.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using FireSharp.Tests.Models;
using NUnit.Framework;

namespace FireSharp.Tests
{
public partial class FiresharpTests
{
private const string TODOS_ASYNC_PATH = "todos/async";

[Test, Category("INTEGRATION_ASYNC")]
public async void PushAsyncTest()
{
var todo = new Todo
{
name = "Do your homework",
priority = 1
};

var response = await _client.PushTaskAsync(string.Format("{0}", TODOS_ASYNC_PATH), todo);
Assert.NotNull(response);
Assert.IsTrue(response.Body.Contains("name"));
}

[Test, Category("INTEGRATION_ASYNC")]
public async void PushChatAsyncTest()
{
var response = await _client.PushTaskAsync("chat", new {name = "ziyasal", text = "Hello there"});
Assert.NotNull(response);
Assert.IsTrue(response.Body.Contains("name"));
}
}
}
Loading

0 comments on commit 03caa1e

Please sign in to comment.