public CreateController(IBoxPacker packer, IBoxStorage attic, IApiRequest dropbox) { _packer = packer; _attic = attic; _dropbox = dropbox; _mimeTypes = new List<string> { "image/jpeg", "image/png" }; _client = new HttpClient(); //ViewBag.IsMobile = Identity.IsMobile; }
public void TestMethod1() { _bagFiller = A.Fake<IBagFiller>(); A.CallTo(() => _bagFiller.FillBag()).Returns(_bag); _boxPacker = A.Fake<IBoxPacker>(); A.CallTo(() => _boxPacker.PackBox(_bag)).Returns(_box); var runner = new PackingRunner(_bagFiller, _boxPacker); var box = runner.PackBagInBox(); Assert.AreEqual(box.Bag.Name, _bag.Name); Assert.AreEqual(box.Name, _box.Name); }
public BoxPacker(IBoxPacker strategy) { Strategy = strategy ?? throw new ArgumentNullException(nameof(strategy)); }
public SearchController(IBoxPacker packer, IBoxStorage attic) { _packer = packer; _attic = attic; }