public void SetUp() { var a = new BoardFailType { Type = 1, Description = "desc" }; this.FacadeService.GetById(1) .Returns(new SuccessResult <BoardFailType>(a)); this.Response = this.Browser.Get( "/production/resources/board-fail-types/1", with => { with.Header("Accept", "application/json"); }).Result; }
public void SetUp() { var a = new BoardFailType { Type = 1 }; var b = new BoardFailType { Type = 2 }; this.FacadeService.GetAll() .Returns(new SuccessResult <IEnumerable <BoardFailType> >(new List <BoardFailType> { a, b })); this.Response = this.Browser.Get( "/production/resources/board-fail-types", with => { with.Header("Accept", "application/json"); }).Result; }
public void SetUp() { this.requestResource = new BoardFailTypeResource { FailType = 1, Description = "Desc" }; var newSkill = new BoardFailType { Type = 1, Description = "Desc" }; this.FacadeService.Add(Arg.Any <BoardFailTypeResource>()) .Returns(new CreatedResult <BoardFailType>(newSkill)); this.Response = this.Browser.Post( "/production/resources/board-fail-types", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.requestResource); }).Result; }
public void SetUp() { this.requestResource = new BoardFailTypeResource { FailType = 1, Description = "New Desc" }; var a = new BoardFailType { Type = 1, Description = "New Desc" }; this.FacadeService.Update(1, Arg.Any <BoardFailTypeResource>()) .Returns(new SuccessResult <BoardFailType>(a)); this.Response = this.Browser.Put( "/production/resources/board-fail-types/1", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.requestResource); }).Result; }