public void SetUp() { var sernosSequenceA = new SernosSequence { Sequence = "A", Description = "description A" }; var sernosSequenceB = new SernosSequence { Sequence = "B", Description = "description B" }; this.SernosSequencesService.GetSequences() .Returns(new SuccessResult <IEnumerable <SernosSequence> >(new List <SernosSequence> { sernosSequenceA, sernosSequenceB })); this.Response = this.Browser.Get( "/inventory/sernos-sequences", with => { with.Header("Accept", "application/json"); }).Result; }
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; }
public void SetUp() { var sernosSequence1 = new SernosSequence("KRYSTAL", "KRYSTAL MOVING COIL CARTRIDGE", 1940, 21.February(2019)); var sernosSequence2 = new SernosSequence("QNAP", "QNAP NAS (TS210)", 10000, null); this.SernosSequenceService.GetAll().Returns( new SuccessResult <IEnumerable <SernosSequence> >( new List <SernosSequence> { sernosSequence1, sernosSequence2 })); this.Response = this.Browser.Get( "/products/maint/sernos-sequences", with => { with.Header("Accept", "application/json"); }).Result; }
public void SetUp() { var sernosSequence = new SernosSequence("KRYSTAL", "KRYSTAL MOVING COIL CARTRIDGE", 1940, 21.February(2019)); this.SernosSequenceService.GetById("KRYSTAL").Returns( new SuccessResult <SernosSequence>(sernosSequence) { Data = sernosSequence }); this.Response = this.Browser.Get( "/products/maint/sernos-sequences/KRYSTAL", with => { with.Header("Accept", "application/json"); }).Result; }
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; }
public void SetUpContext() { this.Sut = new SernosSequence("KRYSTAL", "KRYSTAL MOVING COIL CARTRIDGE", 1940, null); }