Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rofr committed Mar 10, 2014
1 parent 6da194e commit 8a0559e
Show file tree
Hide file tree
Showing 43 changed files with 69,610 additions and 0 deletions.
74 changes: 74 additions & 0 deletions JsonNetFormatter.Test/JsonNetFormatter.Test.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?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>{0F2D92D8-44FB-4C18-BFFC-FAF69B988575}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>JsonNet.Test</RootNamespace>
<AssemblyName>JsonNetFormatter.Test</AssemblyName>
<TargetFrameworkVersion>v4.0</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">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="OrigoDB.Core">
<HintPath>..\packages\OrigoDB.Core.0.10.2\lib\OrigoDB.Core.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="TestModel\Category.cs" />
<Compile Include="TestModel\Collection.cs" />
<Compile Include="TestModel\MyModel.cs" />
<Compile Include="TestModel\MySubModel.cs" />
<Compile Include="TestModel\SubThing.cs" />
<Compile Include="Tests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TestModel\Thing.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Modules.JsonNetFormatter\Modules.JsonNet.csproj">
<Project>{6D137B83-D40D-43C4-8647-468D0C2EF1D0}</Project>
<Name>Modules.JsonNet</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>
36 changes: 36 additions & 0 deletions JsonNetFormatter.Test/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("JsonNetFormatter.Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JsonNetFormatter.Test")]
[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("552d7b6b-5f37-45d5-8a43-c2d12ded7425")]

// 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")]
19 changes: 19 additions & 0 deletions JsonNetFormatter.Test/TestModel/Category.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;

namespace JsonNet.Test
{
[Serializable]
public class Category
{
public readonly string Name;

public Category(string name)
{
Name = name;
Things = new HashSet<Thing>();
}

public ISet<Thing> Things { get; private set; }
}
}
16 changes: 16 additions & 0 deletions JsonNetFormatter.Test/TestModel/Collection.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;

namespace JsonNet.Test
{
[Serializable]
public class Collection
{
public IList<Thing> Things { get; private set; }

public Collection()
{
Things = new List<Thing>();
}
}
}
21 changes: 21 additions & 0 deletions JsonNetFormatter.Test/TestModel/MyModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using OrigoDB.Core;

namespace JsonNet.Test
{
[Serializable]
public class MyModel : Model
{
public Collection Collection = new Collection();
private Dictionary<string, Category> _categories = new Dictionary<string, Category>();

public IDictionary<string, Category> Categories { get { return _categories; } }

public void AddThing(Thing thing)
{
Collection.Things.Add(thing);
}

}
}
19 changes: 19 additions & 0 deletions JsonNetFormatter.Test/TestModel/MySubModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using OrigoDB.Core;

namespace JsonNet.Test
{
[Serializable]
public class MySubModel : Model
{
private Dictionary<string, Model> _models = new Dictionary<string, Model>();

public void AddModel(Model m)
{
_models.Add(m.GetType().FullName, m);
}

public IDictionary<string, Model> Ugg { get { return _models; } }
}
}
19 changes: 19 additions & 0 deletions JsonNetFormatter.Test/TestModel/SubThing.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;

namespace JsonNet.Test
{
[Serializable]
public class SubThing : Thing
{
[NonSerialized]
public int Answer = 42;

public string DingDong { get; set; }

public SubThing(int id, string name)
: base(id, name)
{

}
}
}
23 changes: 23 additions & 0 deletions JsonNetFormatter.Test/TestModel/Thing.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;

namespace JsonNet.Test
{
[Serializable]
public class Thing
{
public readonly int Id;
public readonly string Name;
public HashSet<Category> _categories = new HashSet<Category>();

public Thing RelatedThing { get; set; }

public Thing(int id, string name)
{
this.Id = id;
this.Name = name;
}

public ISet<Category> Categories { get { return _categories; } }
}
}
Loading

0 comments on commit 8a0559e

Please sign in to comment.