* NpgsqlCircleProvider.cs: Refactoring: Npgsql prefix

* Yavsc.sln:
* pkg.mdproj: creates a packaging project

* CircleController.cs: adds a Circle controller

* NUnitTestClass.cs: xml doc

* Web.config:
* Web.csproj:
* TestExec.cs:
* packages.config:
* TestByteA.cs: trying to use xUnit

* YavscClient.csproj:
* ITContentProvider.csproj:
* NpgsqlBlogProvider.csproj:
* NpgsqlMRPProviders.csproj:
* NpgsqlContentProvider.csproj: Helps to fix packaging, and cleans
  dependencies
This commit is contained in:
Paul Schneider
2015-06-09 14:41:52 +02:00
parent 228ff0ae4d
commit 282b750d53
23 changed files with 297 additions and 36 deletions

View File

@ -0,0 +1,58 @@
//
// CircleController.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 GNU GPL
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Web.Http;
namespace Yavsc.ApiControllers
{
/// <summary>
/// Circle controller.
/// </summary>
public class CircleController : ApiController
{
/// <summary>
/// Add the specified id and users.
/// </summary>
/// <param name="id">Identifier.</param>
/// <param name="users">Users.</param>
public void Add(string id, string [] users)
{
throw new NotImplementedException ();
}
/// <summary>
/// Delete the specified id.
/// </summary>
/// <param name="id">Identifier.</param>
public void Delete(string id)
{
throw new NotImplementedException ();
}
/// <summary>
/// Get the specified id.
/// </summary>
/// <param name="id">Identifier.</param>
public string[] Get(string id)
{
throw new NotImplementedException ();
}
}
}

View File

@ -1,3 +1,15 @@
2015-06-09 Paul Schneider <paul@pschneider.fr>
* CircleController.cs: adds a Circle controller
* NUnitTestClass.cs: xml doc
* Web.config:
* Web.csproj:
* TestExec.cs:
* packages.config:
* TestByteA.cs: trying to use xUnit
2015-06-07 Paul Schneider <paul@pschneider.fr>
* CalendarController.cs: removes useless spaces

41
web/NUnitTestClass.cs Normal file
View File

@ -0,0 +1,41 @@
//
// NUnitTestClass.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 GNU GPL
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using NUnit.Framework;
using System;
namespace Yavsc
{
/// <summary>
/// N unit test class.
/// </summary>
[TestFixture ()]
public class NUnitTestClass
{
/// <summary>
/// Tests the case.
/// </summary>
[Test ()]
public void TestCase ()
{
}
}
}

View File

@ -1,18 +1,19 @@
#if TEST
using NUnit.Framework;
using System;
using System.Configuration;
using Npgsql;
using System.Web.Configuration;
namespace Yavsc
{
[TestFixture ()]
public class TestByteA: IDisposable
{
//string cnxName = "yavsc";
string cnxName = "yavsc";
string ConnectionString { get {
return "Server=127.0.0.1;Port=5432;Database=mae;User Id=mae;Password=admin;Encoding=Unicode;" ;
// return ConfigurationManager.ConnectionStrings [cnxName].ConnectionString;
return "Server=127.0.0.1;Port=5432;Database=YavscDev;User Id=yavscdev;Password=admin;Encoding=Unicode;" ;
// Why? not this : return WebConfigurationManager.ConnectionStrings [cnxName].ConnectionString;
} }

42
web/TestExec.cs Normal file
View File

@ -0,0 +1,42 @@
//
// TestExec.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 GNU GPL
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using Xunit;
namespace Yavsc
{
/// <summary>
/// Test exec.
/// </summary>
public class TestExec
{
/// <summary>
/// As the test.
/// </summary>
[Fact]
public void ATest ()
{
Assert.True (true);
}
}
}

View File

@ -45,6 +45,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
<add assembly="System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="nunit.framework, Version=2.6.3.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
</assemblies>
</compilation>
<customErrors mode="Off">

View File

@ -16,7 +16,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<DefineConstants>DEBUG;TEST;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
@ -55,9 +55,6 @@
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Core" />
@ -78,18 +75,24 @@
<Reference Include="System.Net.Http.Formatting" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Web.WebPages.Razor" />
<Reference Include="Mono.Security">
<HintPath>..\packages\Npgsql.2.2.5\lib\net45\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="Npgsql">
<HintPath>..\packages\Npgsql.2.2.5\lib\net45\Npgsql.dll</HintPath>
</Reference>
<Reference Include="PayPalCoreSDK">
<HintPath>..\packages\PayPalCoreSDK.1.6.2\lib\net451\PayPalCoreSDK.dll</HintPath>
</Reference>
<Reference Include="MarkdownDeep">
<HintPath>..\packages\MarkdownDeep.NET.1.5\lib\.NetFramework 3.5\MarkdownDeep.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<Package>nunit</Package>
</Reference>
<Reference Include="xunit.abstractions">
<HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
<Reference Include="xunit.core">
<HintPath>..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll</HintPath>
</Reference>
<Reference Include="xunit.assert">
<HintPath>..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Models\" />
@ -182,6 +185,9 @@
<Compile Include="Helpers\MarkdownHelper.cs" />
<Compile Include="ApiControllers\CalendarController.cs" />
<Compile Include="Formatters\FormatterException.cs" />
<Compile Include="NUnitTestClass.cs" />
<Compile Include="TestExec.cs" />
<Compile Include="ApiControllers\CircleController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Web.config" />
@ -337,6 +343,7 @@
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<Import Project="WebDeploy.targets" />
<Import Project="..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" />
<ProjectExtensions>
<MonoDevelop>
<Properties>

View File

@ -11,4 +11,9 @@
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net451" />
<package id="Npgsql" version="2.2.5" targetFramework="net451" />
<package id="PayPalCoreSDK" version="1.6.2" targetFramework="net451" />
<package id="xunit" version="2.0.0" targetFramework="net451" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="net451" />
<package id="xunit.assert" version="2.0.0" targetFramework="net451" />
<package id="xunit.core" version="2.0.0" targetFramework="net451" />
<package id="xunit.extensibility.core" version="2.0.0" targetFramework="net451" />
</packages>