Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idan domain ucc03 0 #24

Merged
merged 50 commits into from
May 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
9ede6f5
start working on the tests of game center
idanizi May 13, 2017
a5f0916
start working on the tests of game center
idanizi May 13, 2017
421ce80
leagues level, enter a room. create a room
idanizi May 14, 2017
004f14b
room creation
idanizi May 14, 2017
bdcdfc9
adding 2 exceptionsworking on gamecenter, game config min/max enforce…
idanizi May 15, 2017
ef7fc46
join next hand
idanizi May 15, 2017
9b45063
wallet:
idanizi May 15, 2017
7114134
uc013 stand up from table
idanizi May 16, 2017
406e5ec
working on user exposing methods of gamecenter. todo: make the gamece…
idanizi May 16, 2017
780b9a5
game center is now a singleton. logger is thread safe (tests pass :) )
idanizi May 16, 2017
4d402ff
user.enter room
idanizi May 16, 2017
5cbaf57
player test - pass
idanizi May 17, 2017
6547ec0
player test - pass
idanizi May 17, 2017
62ba035
service layer example
idanizi May 17, 2017
3d93394
renaming NewRoom request / result to CreateNewRoom...
idanizi May 18, 2017
55087d1
service layer - to add - user not found exception
idanizi May 18, 2017
20017a4
working on the service and communication layer - ucc03 room service(s…
idanizi May 18, 2017
a56b784
clearing some uneeded files at Poker.API, todo: need to clear more. m…
idanizi May 18, 2017
c6fd335
initial room controller, todo excemption catching
idanizi May 18, 2017
a434bec
room service and controller
idanizi May 18, 2017
a9c149a
setting Newtonsoft.Json as the json formatter (and xml formatter remo…
idanizi May 19, 2017
49cd55f
testing room
idanizi May 20, 2017
3b9f3ef
editing todos, testing room and bug fixing
idanizi May 20, 2017
dd99c53
fixing game config
idanizi May 20, 2017
eed1722
room(:player) ctor test pass
idanizi May 20, 2017
a188238
room(:player, :preferences) ctor test pass
idanizi May 20, 2017
049640b
working on room(:player, :gameconfig) ctor test
idanizi May 20, 2017
0ce05e4
working on room(:player, :gameconfig) ctor test
idanizi May 20, 2017
bf1f9db
room(:player, :gameconfig) ctor test pass
idanizi May 20, 2017
e33952e
join player to table - room - pass
idanizi May 20, 2017
06c3e7c
create player - room - pass
idanizi May 20, 2017
888637a
take and leave chair - room - pass
idanizi May 20, 2017
c45618d
enter room & create new room - gamecenter - pass
idanizi May 21, 2017
6fc5e29
working on join next hand tests
idanizi May 21, 2017
7475af0
working on find rooms
idanizi May 21, 2017
717aaac
working on find rooms
idanizi May 21, 2017
eff02ed
working on find rooms
idanizi May 21, 2017
017e206
find room by criteria - gamecenter - level, palyer - pass
idanizi May 21, 2017
12edd8f
gamecenter test all pass. working on user tests of ucc03 methods - la…
idanizi May 21, 2017
053b018
gamecenter test all pass. working on user tests of ucc03 methods - la…
idanizi May 21, 2017
b34ea9e
all tests pass ucc03
idanizi May 21, 2017
e2258b7
fixing for ci
idanizi May 21, 2017
e71afa6
fixing for ci
idanizi May 21, 2017
18b0732
fixing for ci
idanizi May 21, 2017
be9f021
fixing for ci
idanizi May 21, 2017
83b1fd4
Merge remote-tracking branch 'origin/master' into idan_domain_ucc03_0
idanizi May 21, 2017
29c6e5d
fixing build bugs after merge. todo - paly move test not fail - fixme
idanizi May 22, 2017
218bb3a
all tests pass
idanizi May 22, 2017
5193a2d
fix for PR comments
idanizi May 23, 2017
fe633eb
fix for PR comments - all test pass
idanizi May 23, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions Poker.BE/Poker.BE.API.Tests/Controllers/HomeControllerTest.cs

This file was deleted.

60 changes: 0 additions & 60 deletions Poker.BE/Poker.BE.API.Tests/Controllers/ValuesControllerTest.cs

This file was deleted.

5 changes: 3 additions & 2 deletions Poker.BE/Poker.BE.API.Tests/Poker.BE.API.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Controllers\HomeControllerTest.cs" />
<Compile Include="Controllers\ValuesControllerTest.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="App.config" />
Expand All @@ -109,6 +107,9 @@
<Name>Poker.BE.API</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\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.
Expand Down
9 changes: 7 additions & 2 deletions Poker.BE/Poker.BE.API/App_Start/WebApiConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ public static void Register(HttpConfiguration config)
{
// Web API configuration and services

// Setting the configuration for Json Formatting
var jsonFormatter = config.Formatters.JsonFormatter;
jsonFormatter.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.Objects;
config.Formatters.Remove(config.Formatters.XmlFormatter);

// Web API routes
config.MapHttpAttributeRoutes();

config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
routeTemplate: "api/{controller}/{action}/{param}",
defaults: new { param = RouteParameter.Optional }
);
}
}
Expand Down
19 changes: 0 additions & 19 deletions Poker.BE/Poker.BE.API/Controllers/HomeController.cs

This file was deleted.

35 changes: 34 additions & 1 deletion Poker.BE/Poker.BE.API/Controllers/RoomController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System;
using Poker.BE.Service.Modules.Requests;
using Poker.BE.Service.Modules.Results;
using Poker.BE.Service.IServices;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
Expand All @@ -9,5 +13,34 @@ namespace Poker.BE.API.Controllers
{
public class RoomController : ApiController
{
#region Fields
private IRoomsService service;
#endregion

#region Constructors
public RoomController()
{
service = new Service.Services.RoomsService();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new Service.Services? seems like bad smell or maybe I miss something

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you miss something.

}
#endregion

#region Methods
[HttpPost]
public HttpResponseMessage EnterRoom(EnterRoomRequest request)
{
var result = default(EnterRoomResult);

try
{
result = service.EnterRoom(request);
}
catch (Exception e)
{
result.ErrorMessage = e.Message;
}

return Request.CreateResponse(HttpStatusCode.OK, result);
}
#endregion
}
}
52 changes: 0 additions & 52 deletions Poker.BE/Poker.BE.API/Controllers/ValuesController.cs

This file was deleted.

2 changes: 2 additions & 0 deletions Poker.BE/Poker.BE.API/Global.asax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);

// TODO: idan - this is MVC adding, clear this
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
Expand Down
14 changes: 6 additions & 8 deletions Poker.BE/Poker.BE.API/Poker.BE.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,13 @@
<Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
<Compile Include="Controllers\AuthenticationController.cs" />
<Compile Include="Controllers\HistoryController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\LeagueController.cs" />
<Compile Include="Controllers\LevelController.cs" />
<Compile Include="Controllers\MessageController.cs" />
<Compile Include="Controllers\NotificationController.cs" />
<Compile Include="Controllers\PokerGamePlayController.cs" />
<Compile Include="Controllers\ProfileController.cs" />
<Compile Include="Controllers\RoomController.cs" />
<Compile Include="Controllers\ValuesController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
Expand Down Expand Up @@ -261,18 +259,18 @@
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Poker.BE.Domain\Poker.BE.Domain.csproj">
<Project>{fe034180-e60e-416e-8d0f-0d9155ac52cc}</Project>
<Name>Poker.BE.Domain</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="Scripts\jquery-3.1.1.slim.min.map" />
</ItemGroup>
<ItemGroup>
<Content Include="Scripts\jquery-3.1.1.min.map" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Poker.BE.Service\Poker.BE.Service.csproj">
<Project>{fe55ce81-34e4-49dd-b43d-b62b2490dc34}</Project>
<Name>Poker.BE.Service</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
Expand Down
5 changes: 5 additions & 0 deletions Poker.BE/Poker.BE.API/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=301879

TODO: (idan)
* connection strings
* Allow-Cross-To-Origin headers

-->
<configuration>
<appSettings>
Expand Down
Loading