Ejemplo n.º 1
0
 public void Update(
     string forecastType,
     DateTime?forecastFromDate,
     DateTime?forecastToDate,
     decimal?percentageOfRootProductSales,
     SaCoreType coreType)
 {
     this.ForecastType                 = forecastType;
     this.ForecastFromDate             = forecastFromDate;
     this.ForecastToDate               = forecastToDate;
     this.PercentageOfRootProductSales = percentageOfRootProductSales;
     this.SaCoreType = coreType;
 }
Ejemplo n.º 2
0
        public void SetUp()
        {
            var saCoreType = new SaCoreType(1, "description");

            this.SaCoreTypeService.GetById(1)
            .Returns(new SuccessResult <SaCoreType>(saCoreType));

            this.Response = this.Browser.Get(
                "/products/maint/sa-core-types/1",
                with =>
            {
                with.Header("Accept", "application/json");
            }).Result;
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(this.NotFound());
            }

            this.SaCoreType = await this.context.SaCoreType.FirstOrDefaultAsync(m => m.CoreType == id);

            if (this.SaCoreType == null)
            {
                return(this.NotFound());
            }

            return(this.Page());
        }
        public void SetUp()
        {
            var saCoreType1 = new SaCoreType(1, "description");
            var saCoreType2 = new SaCoreType(2, "description");

            this.SaCoreTypeService.GetAll()
            .Returns(new SuccessResult <IEnumerable <SaCoreType> >(new List <SaCoreType> {
                saCoreType1, saCoreType2
            }));

            this.Response = this.Browser.Get(
                "/products/maint/sa-core-types/",
                with =>
            {
                with.Header("Accept", "application/json");
            }).Result;
        }
Ejemplo n.º 5
0
        public void SetUp()
        {
            this.requestResource = new SaCoreTypeResource {
                Description = "new description"
            };

            var saCoreType = new SaCoreType(1, "description");

            this.SaCoreTypeService.Add(Arg.Any <SaCoreTypeResource>())
            .Returns(new SuccessResult <SaCoreType>(saCoreType));

            this.Response = this.Browser.Post(
                "/products/maint/sa-core-types",
                with =>
            {
                with.Header("Accept", "application/json");
                with.Header("Content-Type", "application/json");
                with.JsonBody(this.requestResource);
            }).Result;
        }
Ejemplo n.º 6
0
 public void SetUp()
 {
     this.salesArticle = new SalesArticle
     {
         ArticleNumber  = "sa",
         ForecastType   = "N",
         ForecastToDate = 1.December(2019)
     };
     this.coreType = new SaCoreType(1, "thing");
     this.resource = new SalesArticleResource
     {
         ArticleNumber  = "sa",
         Description    = "new desc",
         ForecastType   = "Y",
         ForecastToDate = 1.December(2020).ToString("o"),
         Links          = new LinkResource[] { new LinkResource("sa-core-type", string.Empty) }
     };
     this.SalesArticleRepository.FindById("sa")
     .Returns(this.salesArticle);
     this.SaCoreTypeRepository.FindById(1)
     .Returns(this.coreType);
     this.result = this.Sut.Update("sa", this.resource);
 }
        public void SetUp()
        {
            this.coreType = new SaCoreType(1, "desc");

            this.Sut.Update("Y", 1.December(2019), null, 12, this.coreType);
        }
Ejemplo n.º 8
0
 public void SetUpContext()
 {
     this.Sut = new SaCoreType(1, "description");
 }