Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public BoxPacker(IBoxPacker strategy)
 {
     Strategy = strategy ?? throw new ArgumentNullException(nameof(strategy));
 }
Exemplo n.º 4
0
 public SearchController(IBoxPacker packer, IBoxStorage attic)
 {
     _packer = packer;
     _attic = attic;
 }