public void SetUp() { this.requestResource = new AteTestResource { TestId = 1 }; var ateTest = new AteTest { TestId = 1, NumberTested = 1, WorksOrder = new WorksOrder { AteTests = new List <AteTest>() }, User = new Employee { Id = 1, FullName = "Name" }, PcbOperator = new Employee { Id = 1, FullName = "Name" } }; this.AteTestService.Add(Arg.Any <AteTestResource>()) .Returns(new CreatedResult <AteTest>(ateTest)); this.Response = this.Browser.Post( "/production/quality/ate-tests/", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.requestResource); }).Result; }
public void SetUp() { var test1 = new AteTest { TestId = 1, NumberTested = 1, WorksOrder = new WorksOrder { AteTests = new List <AteTest>() }, User = new Employee { Id = 1, FullName = "Name" }, PcbOperator = new Employee { Id = 1, FullName = "Name" } }; this.AteTestService.Search("1") .Returns(new SuccessResult <IEnumerable <AteTest> >(new List <AteTest> { test1 })); this.Response = this.Browser.Get( "/production/quality/ate-tests", with => { with.Header("Accept", "application/json"); with.Query("searchTerm", "1"); }).Result; }
public void SetUp() { var ateTest = new AteTest { TestId = 1, UserNumber = 1, WorksOrderNumber = 1, NumberTested = 1, NumberOfSmtComponents = 1, NumberOfPcbComponents = 1, NumberOfPcbFails = 1, NumberOfSmtFails = 1, NumberOfPcbBoardFails = 1, NumberOfSmtBoardFails = 1, PcbOperator = 1 }; this.AteTestService.GetById(1) .Returns(new SuccessResult <AteTest>(ateTest)); this.Response = this.Browser.Get( "/production/quality/ate-tests/1", with => { with.Header("Accept", "application/json"); }).Result; }
public void SetUp() { var ateTest = new AteTest { TestId = 1, User = new Employee { Id = 1, FullName = "Name" }, WorksOrder = new WorksOrder { OrderNumber = 1, Part = new Part { PartNumber = "P", Description = "D" }, AteTests = new List <AteTest>() }, NumberTested = 1, NumberOfSmtComponents = 1, NumberOfPcbComponents = 1, NumberOfPcbFails = 1, NumberOfSmtFails = 1, NumberOfPcbBoardFails = 1, NumberOfSmtBoardFails = 1, PcbOperator = new Employee { Id = 1, FullName = "Name" }, Details = new List <AteTestDetail> { new AteTestDetail { ItemNumber = 1, TestId = 1 } } }; this.AteTestService.GetById(1).Returns(new SuccessResult <AteTest>(ateTest)); this.Response = this.Browser.Get( "/production/quality/ate-tests/1", with => { with.Header("Accept", "application/json"); }).Result; }