public void SetUp()
        {
            var a = new PartFailErrorType
            {
                ErrorType = "ERROR"
            };

            this.ErrorTypeService.GetById("ERROR").Returns(new SuccessResult <PartFailErrorType>(a));

            this.Response = this.Browser.Get(
                "/production/quality/part-fail-error-types/ERROR",
                with => { with.Header("Accept", "application/json"); }).Result;
        }
Exemple #2
0
        public void SetUp()
        {
            var a = new PartFailErrorType {
                ErrorType = "Error A"
            };
            var b = new PartFailErrorType {
                ErrorType = "Error B"
            };

            var errorTypes = new List <PartFailErrorType> {
                a, b
            };

            this.ErrorTypeService.GetAll().Returns(new SuccessResult <IEnumerable <PartFailErrorType> >(errorTypes));

            this.Response = this.Browser.Get(
                "/production/quality/part-fail-error-types",
                with => { with.Header("Accept", "application/json"); }).Result;
        }
Exemple #3
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;
        }
Exemple #4
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;
        }