public void SetUp()
        {
            this.labelType = new LabelType
            {
                LabelTypeCode       = "newTcode",
                BarcodePrefix       = "pf",
                CommandFilename     = "cmdfilename",
                DefaultPrinter      = "printer1",
                Description         = "desc",
                Filename            = "filenm",
                NSBarcodePrefix     = "ns",
                TestCommandFilename = "tstcmdfilenm",
                TestFilename        = "testfilenm",
                TestPrinter         = "testprintr"
            };

            this.resource = new LabelTypeResource
            {
                LabelTypeCode       = "newTcode",
                BarcodePrefix       = "pf",
                CommandFilename     = "cmdfilename",
                DefaultPrinter      = "printer1",
                Description         = "desc",
                Filename            = "filenm",
                NSBarcodePrefix     = "ns",
                TestCommandFilename = "tstcmdfilenm",
                TestFilename        = "testfilenm",
                TestPrinter         = "testprintr"
            };

            this.LabelTypeRepository.FindById(this.labelType.LabelTypeCode)
            .Returns(this.labelType);
            this.result = this.Sut.Update(this.labelType.LabelTypeCode, this.resource);
        }
        public void SetUp()
        {
            this.resource = new LabelTypeResource
            {
                LabelTypeCode       = "newTcode",
                BarcodePrefix       = "pf",
                CommandFilename     = "cmdfilename",
                DefaultPrinter      = "printer1",
                Description         = "desc",
                Filename            = "filenm",
                NSBarcodePrefix     = "ns",
                TestCommandFilename = "tstcmdfilenm",
                TestFilename        = "testfilenm",
                TestPrinter         = "testprintr"
            };

            this.result = this.Sut.Add(this.resource);
        }
Exemple #3
0
        public void SetUp()
        {
            this.requestResource = new LabelTypeResource()
            {
                LabelTypeCode       = "newTcode",
                BarcodePrefix       = "pf",
                CommandFilename     = "cmdfilename",
                DefaultPrinter      = "printer1",
                Description         = "desc",
                Filename            = "filenm",
                NSBarcodePrefix     = "ns",
                TestCommandFilename = "tstcmdfilenm",
                TestFilename        = "testfilenm",
                TestPrinter         = "testprintr"
            };
            var newLabelType = new LabelType
            {
                LabelTypeCode       = "newTcode",
                BarcodePrefix       = "pf",
                CommandFilename     = "cmdfilename",
                DefaultPrinter      = "printer1",
                Description         = "desc",
                Filename            = "filenm",
                NSBarcodePrefix     = "ns",
                TestCommandFilename = "tstcmdfilenm",
                TestFilename        = "testfilenm",
                TestPrinter         = "testprintr"
            };

            this.LabelTypeService.Update("newTcode", Arg.Any <LabelTypeResource>())
            .Returns(new SuccessResult <LabelType>(newLabelType));

            this.Response = this.Browser.Put(
                "/production/resources/label-types/newTcode",
                with =>
            {
                with.Header("Accept", "application/json");
                with.Header("Content-Type", "application/json");
                with.JsonBody(this.requestResource);
            }).Result;
        }