Exemplo n.º 1
0
        public void SetUp()
        {
            var a = new PartFailErrorType
            {
                ErrorType = "ERROR"
            };

            this.requestResource = new PartFailErrorTypeResource {
                ErrorType = "ERROR"
            };

            this.ErrorTypeService.Update("ERROR", Arg.Any <PartFailErrorTypeResource>()).Returns(new SuccessResult <PartFailErrorType>(a));

            this.Response = this.Browser.Put(
                "/production/quality/part-fail-error-types/ERROR",
                with =>
            {
                with.Header("Accept", "application/json");
                with.JsonBody(this.requestResource);
            }).Result;
        }
Exemplo n.º 2
0
        public void SetUp()
        {
            this.requestResource = new PartFailErrorTypeResource
            {
                ErrorType = "ERROR"
            };

            var partFailErrorType = new PartFailErrorType
            {
                ErrorType = "ERROR"
            };

            this.ErrorTypeService.Add(Arg.Any <PartFailErrorTypeResource>())
            .Returns(new CreatedResult <PartFailErrorType>(partFailErrorType));

            this.Response = this.Browser.Post(
                "/production/quality/part-fail-error-types",
                with =>
            {
                with.Header("Accept", "application/json");
                with.Header("Content-Type", "application/json");
                with.JsonBody(this.requestResource);
            }).Result;
        }