public void CreateNewFixedBudgetProjectShouldThrowGivenCodeAlreadyExists() { InMemoryBudgetBucketRepository subject = CreateSubject(); subject.GetOrCreateNew(FixedBudgetProjectBucket.CreateCode("Foo"), () => new FixedBudgetProjectBucket("Foo", "Foo bajh", 2000)); subject.CreateNewFixedBudgetProject("Foo", "Foo var", 1000); Assert.Fail(); }
public void TestInitialise() { this.testData = new FixedBudgetBucketDto { Code = FixedBudgetProjectBucket.CreateCode(TestDataCode), Description = "Foo bar tiddle-de-dum", FixedBudgetAmount = 2000 }; var subject = new Mapper_BudgetBucketDto_BudgetBucket(new BudgetBucketFactory()); this.result = subject.ToModel(this.testData); }
public void ShouldMapCode() { Assert.AreEqual(FixedBudgetProjectBucket.CreateCode(FixedProjectCode), this.result.Code); }