示例#1
0
        public void SetUp()
        {
            this.manufacturingOperation = new ManufacturingOperation(
                "routecode 1",
                77,
                15,
                "descrip of op",
                "codeOfSkill",
                "res Code",
                27,
                54,
                5,
                "cit code test");

            this.resource = new ManufacturingOperationResource
            {
                RouteCode        = "routecode 1",
                ManufacturingId  = 77,
                OperationNumber  = 15,
                Description      = "descrip of op",
                SkillCode        = "codeOfOperation",
                ResourceCode     = "res Code",
                SetAndCleanTime  = 27,
                CycleTime        = 54,
                LabourPercentage = 5,
                CITCode          = "cit code test"
            };

            this.ManufacturingOperationRepository
            .FindById(this.manufacturingOperation.ManufacturingId)
            .Returns(this.manufacturingOperation);

            this.result = this.Sut.Update(this.manufacturingOperation.ManufacturingId, this.resource);
        }
示例#2
0
        public void SetUp()
        {
            this.manufacturingOperation = new ManufacturingOperation("routecode 1", 77, 15, "descrip of op", "codeOfOperation", "res Code", 27, 54, 5, "cit code test");

            this.requestResource = new ManufacturingOperationResource
            {
                RouteCode        = "routecode 1",
                ManufacturingId  = 77,
                OperationNumber  = 15,
                Description      = "descrip of op",
                SkillCode        = "codeOfOperation",
                ResourceCode     = "res Code",
                SetAndCleanTime  = 27,
                CycleTime        = 54,
                LabourPercentage = 5,
                CITCode          = "cit code test"
            };

            this.ManufacturingOperationService.Add(Arg.Any <ManufacturingOperationResource>())
            .Returns(new CreatedResult <ManufacturingOperation>(this.manufacturingOperation));

            this.Response = this.Browser.Post(
                "/production/resources/manufacturing-operations",
                with =>
            {
                with.Header("Accept", "application/json");
                with.Header("Content-Type", "application/json");
                with.JsonBody(this.requestResource);
            }).Result;
        }
示例#3
0
        public void SetUp()
        {
            this.manufacturingOperation = new ManufacturingOperation(
                "routecode 1",
                0,
                15,
                "descrip of op",
                "codeOfOperation",
                "res Code",
                27,
                54,
                5,
                "cit code test");

            this.resource = new ManufacturingOperationResource
            {
                RouteCode        = "routecode 1",
                OperationNumber  = 15,
                Description      = "descrip of op",
                SkillCode        = "codeOfOperation",
                ResourceCode     = "res Code",
                SetAndCleanTime  = 27,
                CycleTime        = 54,
                LabourPercentage = 5,
                CITCode          = "cit code test"
            };

            this.result = this.Sut.Add(this.resource);
        }
示例#4
0
        public void SetUp()
        {
            this.manufacturingOperation = new ManufacturingOperation("routecode1", 77, 15, "descrip of op", "codeOfOperation", "res Code", 27, 54, 5, "cit code test");

            this.ManufacturingOperationService.GetById(77)
            .Returns(new SuccessResult <ManufacturingOperation>(this.manufacturingOperation));

            this.Response = this.Browser.Get(
                "/production/resources/manufacturing-operations/77",
                with => { with.Header("Accept", "application/json"); }).Result;
        }
示例#5
0
        public void SetUp()
        {
            this.manufacturingOperation  = new ManufacturingOperation("routecode 1", 77, 15, "descrip of op", "codeOfOperation", "res Code", 27, 54, 5, "cit code test");
            this.manufacturingOperation2 = new ManufacturingOperation("routecode 2", 58, 22, "descrip of op2", "codeOfOperation2", "res Code2", 272, 542, 52, "cit code test2");

            this.ManufacturingOperationService.GetAll()
            .Returns(new SuccessResult <IEnumerable <ManufacturingOperation> >(new List <ManufacturingOperation> {
                this.manufacturingOperation, this.manufacturingOperation2
            }));

            this.Response = this.Browser.Get(
                "/production/resources/manufacturing-operations",
                with => { with.Header("Accept", "application/json"); }).Result;
        }