Skip to content

Commit

Permalink
Renaming Accounts to ClientAccounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ananth.K committed Mar 3, 2011
1 parent a7ee9b2 commit 754efdf
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 74 deletions.
120 changes: 60 additions & 60 deletions Src/AnujBank/AnujBank/AnujBank.csproj
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{FE6A3377-5568-4B7F-BF89-C27F3C8208A0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AnujBank</RootNamespace>
<AssemblyName>AnujBank</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="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="Account.cs" />
<Compile Include="AccountId.cs" />
<Compile Include="ClientId.cs" />
<Compile Include="Feed.cs" />
<Compile Include="FeedProcessor.cs" />
<Compile Include="InvalidAccountIdException.cs" />
<Compile Include="InvalidClientIdException.cs" />
<Compile Include="IRepository.cs" />
<Compile Include="Accounts.cs" />
<Compile Include="Client.cs" />
<Compile Include="Payment.cs" />
<Compile Include="PaymentInstructionService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Structure.cs" />
<Compile Include="Structures.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{FE6A3377-5568-4B7F-BF89-C27F3C8208A0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AnujBank</RootNamespace>
<AssemblyName>AnujBank</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="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="Account.cs" />
<Compile Include="AccountId.cs" />
<Compile Include="ClientId.cs" />
<Compile Include="Feed.cs" />
<Compile Include="FeedProcessor.cs" />
<Compile Include="InvalidAccountIdException.cs" />
<Compile Include="InvalidClientIdException.cs" />
<Compile Include="IRepository.cs" />
<Compile Include="ClientAccounts.cs" />
<Compile Include="Client.cs" />
<Compile Include="Payment.cs" />
<Compile Include="PaymentInstructionService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Structure.cs" />
<Compile Include="Structures.cs" />
</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>
4 changes: 2 additions & 2 deletions Src/AnujBank/AnujBank/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ namespace AnujBank
public class Client
{
private readonly ClientId clientId;
private readonly Accounts holdings;
private readonly ClientAccounts holdings;
private readonly Structures structures;

public Client(ClientId clientId, Accounts holdings)
public Client(ClientId clientId, ClientAccounts holdings)
{
this.clientId = clientId;
this.holdings = holdings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace AnujBank
{
public class Accounts
public class ClientAccounts
{
private readonly Account[] _accounts;

public Accounts(params Account[] accounts)
public ClientAccounts(params Account[] accounts)
{
_accounts = accounts;
}
Expand Down
8 changes: 4 additions & 4 deletions Src/AnujBank/AnujBank/Structure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ namespace AnujBank
{
public class Structure
{
private readonly Accounts sourceAccounts;
private readonly ClientAccounts sourceClientAccounts;

public Structure(Accounts sourceAccounts)
public Structure(ClientAccounts sourceClientAccounts)
{
if(sourceAccounts.Count < 2) throw new ArgumentException("A structure must have at least 2 source accounts.");
this.sourceAccounts = sourceAccounts;
if(sourceClientAccounts.Count < 2) throw new ArgumentException("A structure must have at least 2 source accounts.");
this.sourceClientAccounts = sourceClientAccounts;
}
}
}
6 changes: 3 additions & 3 deletions Src/AnujBank/TestAnujBank/TestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public void ShouldBeAbleAddAStructure()
var clientId = new ClientId("ABC123");
var account1 = new Account(new AccountId(12341234), clientId);
var account2 = new Account(new AccountId(12341235), clientId);
Accounts accounts = new Accounts(account1, account2);
var structure = new Structure(accounts);
var client = new Client(clientId, accounts);
ClientAccounts clientAccounts = new ClientAccounts(account1, account2);
var structure = new Structure(clientAccounts);
var client = new Client(clientId, clientAccounts);
client.AddStructure(structure);
Assert.IsTrue(client.Contains(structure));
}
Expand Down
2 changes: 1 addition & 1 deletion Src/AnujBank/TestAnujBank/TestStructure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public void ShouldNotBeAbleToCreateAStructureWithLessThanTwoSourceAccounts()
{
var clientId = new ClientId("ABC123");
var account1 = new Account(new AccountId(12341234), clientId);
var accounts = new Accounts(account1);
var accounts = new ClientAccounts(account1);
Assert.Throws<ArgumentException>(() => new Structure(accounts));
}
}
Expand Down
4 changes: 2 additions & 2 deletions Src/AnujBank/TestAnujBank/TestStructures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public void ShouldBeAbleToAddAStructure()
var clientId = new ClientId("ABC123");
var account1 = new Account(new AccountId(12341234), clientId);
var account2 = new Account(new AccountId(12341235), clientId);
Accounts accounts = new Accounts(account1, account2);
var structure = new Structure(accounts);
ClientAccounts clientAccounts = new ClientAccounts(account1, account2);
var structure = new Structure(clientAccounts);
var structures = new Structures();
structures.Add(structure);

Expand Down

0 comments on commit 754efdf

Please sign in to comment.