public String RenderBasketOnceResolved(IBasket basket) { var resolver = new RenderBasket_IBasketResolver(this); basket.Accept(resolver); return(resolver.Result); }
protected Decimal?TryGetTotalByBasketOnceResolved(IBasket basket, String benchmarkId, BenchmarkRepository benchmarkRepository) { var resolver = new TryGetTotalByBasket_IBasketResolver(this, benchmarkRepository, benchmarkId); basket.Accept(resolver); return(resolver.Result); }
public static CountryBasket TryAsCountryBasket(this IBasket basket) { var resolver = new TryAs_IBasketResolver(); basket.Accept(resolver); return(resolver.CountryBasketOpt); }
public static RegionBasket TryAsRegionBasket(this IBasket basket) { var resolver = new TryAs_IBasketResolver(); basket.Accept(resolver); return(resolver.RegionBasketOpt); }
public Boolean IsSecurityFromBasketOnceResolved(ISecurity security, IBasket basket) { var resolver = new IsSecurityFromBasket_IBasketResolver(this, security); basket.Accept(resolver); return(resolver.Result); }
public BasketModel SerializeBasketOnceResolved(IBasket model) { var resolver = new SerializeBasketOnceResolved_IBasketResolver(this); model.Accept(resolver); return(resolver.Result); }
public void ShippableProductVisitor_Returns_Only_Shippable_Products() { //// Arrange const int expected = 4; var visitor = new ShippableProductVisitor(); //// Act _basket.Accept(visitor); //// Assert Assert.AreEqual(expected, visitor.ShippableItems.Count()); }
public void ShippableProductVisitor_Returns_Only_Shippable_Products() { //// Arrange var notShippable = PreTestDataWorker.MakeExistingProduct(false); _basket.AddItem(notShippable); const int expected = 4; var visitor = new ShippableProductVisitor(); //// Act _basket.Accept(visitor); //// Assert Assert.AreEqual(expected, visitor.ShippableItems.Count()); }