public void ImportStructureTest() { using (SapRfcConnection conn = this.GetConnection()) { var customer = new ZCustomer { Id = 3, Name = "Microsoft", IsActive = true }; var result = conn.ExecuteFunction("Z_SSRT_ADD_CUSTOMER", new RfcParameter("i_customer", customer) ); string message = result.GetOutput <string>("e_success"); Assert.Equal("Created: 3 - Microsoft - X", message); } }
public void ChangingSingleStructureAsTableTest() { using (SapRfcConnection conn = this.GetConnection()) { ZCustomer customer = new ZCustomer() { Id = 1 }; var result = conn.ExecuteFunction("Z_SSRT_QUERY_CUSTOMERS", new RfcParameter("c_customers", customer) ); var customers = result.GetTable <ZCustomer>("c_customers"); Assert.Equal(1, customers.Count()); Assert.Equal(1, customers.ElementAt(0).Id); Assert.Equal("Apple Store", customers.ElementAt(0).Name); Assert.Equal(0, customers.ElementAt(0).Age); Assert.Equal(true, customers.ElementAt(0).IsActive); } }