コード例 #1
0
        public void SetUp()
        {
            this.requestResource = new SernosSequenceResource {
                SequenceName = "KRYSTAL"
            };
            var sernosSequence = new SernosSequence(
                "KRYSTAL",
                "KRYSTAL MOVING COIL CARTRIDGE",
                1940,
                21.February(2019));

            this.SernosSequenceService.Add(Arg.Any <SernosSequenceResource>()).Returns(
                new CreatedResult <SernosSequence>(sernosSequence)
            {
                Data = sernosSequence
            });

            this.Response = this.Browser.Post(
                "/products/maint/sernos-sequences",
                with =>
            {
                with.Header("Accept", "application/json");
                with.Header("Content-Type", "application/json");
                with.JsonBody(this.requestResource);
            }).Result;
        }
コード例 #2
0
        public void SetUp()
        {
            this.resource = new SernosSequenceResource
            {
                SequenceName     = "KRYSTAL",
                Description      = "KRYSTAL MOVING COIL CARTRIDGE",
                NextSerialNumber = 1940,
                DateClosed       = 21.February(2019).ToString("o")
            };

            this.result = this.Sut.Add(this.resource);
        }
コード例 #3
0
        public void SetUp()
        {
            this.sequenceName = "QNAP";

            this.resource = new SernosSequenceResource
            {
                SequenceName     = "KRYSTAL",
                Description      = "KRYSTAL MOVING COIL CARTRIDGE",
                NextSerialNumber = 1940,
                DateClosed       = 21.February(2019).ToString("o")
            };

            this.SernosSequenceRepository.FindById(this.sequenceName).Returns(
                new SernosSequence(this.sequenceName, "QNAP NAS (TS210)", 10000, null));
            this.result = this.Sut.Update(this.sequenceName, this.resource);
        }
コード例 #4
0
        public void SetUp()
        {
            this.requestResource = new SernosSequenceResource {
                SequenceName = "KRYSTAL", Description = "NEW DESCRIPTION"
            };
            var sernosSequence = new SernosSequence("KRYSTAL", "NEW DESCRIPTION", 1940, 21.February(2019));

            this.SernosSequenceService.Update("KRYSTAL", Arg.Any <SernosSequenceResource>()).Returns(
                new SuccessResult <SernosSequence>(sernosSequence)
            {
                Data = sernosSequence
            });

            this.Response = this.Browser.Put(
                "/products/maint/sernos-sequences/KRYSTAL",
                with =>
            {
                with.Header("Accept", "application/json");
                with.Header("Content-Type", "application/json");
                with.JsonBody(this.requestResource);
            }).Result;
        }