Пример #1
0
        public TransferredStock(TransferableStock parent, string notes)
        {
            foreach (var prop in parent.GetType().GetProperties())
            {
                this.GetType()
                .GetProperty(prop.Name)
                ?.SetValue(this, prop.GetValue(parent, null), null);
            }

            this.Notes = notes;
        }
        public void SetUp()
        {
            var transferableStockA = new TransferableStock
            {
                ArticleNumber = "A"
            };
            var transferableStockB = new TransferableStock
            {
                ArticleNumber = "B"
            };

            this.TpkFacadeService.GetTransferableStock()
            .Returns(new SuccessResult <IEnumerable <TransferableStock> >(new List <TransferableStock> {
                transferableStockA, transferableStockB
            }));

            this.Response = this.Browser.Get(
                "/logistics/tpk/items",
                with =>
            {
                with.Header("Accept", "application/json");
            }).Result;
        }