Commit 5999f7d
Changed files (3)
src
domain
test
src/domain/Production.cs
@@ -25,7 +25,7 @@ namespace domain
public virtual bool IsGreaterThanAvailableAt(IFacility facility)
{
- return facility.AvailableCapacityFor(this.month).IsGreaterThan(produced);
+ return produced.IsGreaterThan(facility.AvailableCapacityFor(this.month));
}
public IQuantity ProductionOf<T>() where T : ICommodity, new()
src/domain/Well.cs
@@ -43,9 +43,8 @@ namespace domain
this.curve.Accept( production =>
{
if( production.OccursDuring(period)){
- if(production.IsGreaterThanAvailableAt(facility)){
+ if(production.IsGreaterThanAvailableAt(facility))
throw new Exception();
- }
}
});
}
src/test/Mock.cs
@@ -9,7 +9,7 @@ namespace test
return MockRepository.GenerateMock<T>();
}
}
- public static class Assertsions
+ public static class Assertions
{
public static void received<T>(this T mock,System.Action<T> action)
{