public void GetPierClaimLocation_AreEqual() { //Arrange var SystemUnderTest = new RestService(); var dependency = new GetPierClaimLocationInput() { AppName = "Admin User", Username = "******", DeviceName = "Apple", Station = "123", Version = "1" }; var expected = new GetPierClaimLocationResponse(); PierClaimLocations main1 = new PierClaimLocations(); main1.Name = "Pier"; main1.SubLocations = new string[] { "Pier 1", "Pier 2", "Pier 3" }; PierClaimLocations main2 = new PierClaimLocations(); main2.Name = "DCI Bullpen"; main2.SubLocations = new string[] { }; PierClaimLocations main3 = new PierClaimLocations(); main3.Name = "Arrivals"; main3.SubLocations = new string[] { "DL Arvl", "OA Arvl", "AS Arvl" }; expected.MainLocations = new PierClaimLocations[] { main1, main2, main3 }; expected.StatusCode = "0"; //Act var actual = SystemUnderTest.GetPierClaimLocation(dependency); //Assert Assert.AreEqual(expected.StatusCode, actual.StatusCode); }
public GetPierClaimLocationResponse GetPierClaimLocation(GetPierClaimLocationInput input) { //logger.Trace("Service : IRestService, Method : GetPierClaimLocation, Request : GetPierClaimLocationInput = {"Appname":user.Name,"Username" : user.Username, "DeviceName" : "Apple", "Station" : "123", "Version" : "1" };") GetPierClaimLocationResponse getPierClaimLocationResponse = new GetPierClaimLocationResponse(); PierClaimLocations main1 = new PierClaimLocations(); main1.Name = "Pier"; main1.SubLocations = new string[] { "Pier 1", "Pier 2", "Pier 3" }; PierClaimLocations main2 = new PierClaimLocations(); main2.Name = "DCI Bullpen"; main2.SubLocations = new string[] { }; PierClaimLocations main3 = new PierClaimLocations(); main3.Name = "Arrivals"; main3.SubLocations = new string[] { "DL Arvl", "OA Arvl", "AS Arvl" }; getPierClaimLocationResponse.MainLocations = new PierClaimLocations[] { main1, main2, main3 }; getPierClaimLocationResponse.ReturnCode = "1"; //logger.Trace("Service : IRestService , Method : GetPierClaimLocation , Response : GetPierClaimLocationResponse = {"MainLocation":PierResponse.MainLocation, "ReturnCode":PierResponse.ReturnCode,"Message":PierResponse.Message}; return(getPierClaimLocationResponse); }
public GetPierClaimLocationResponse GetPierClaimLocation(GetPierClaimLocationInput input) { logger.Trace("Service : IRestService, Method : GetPierClaimLocation, Request : GetPierClaimLocationInput = {'Appname':user.Name,'Username' : user.Username, 'DeviceName' : 'Apple', 'Station' : '123', 'Version' : '1' }"); GetPierClaimLocationResponse getPierClaimLocationResponse = new GetPierClaimLocationResponse(); PierClaimLocations main1 = new PierClaimLocations(); main1.Name = "Pier"; main1.SubLocations = new string[] { "Pier 1", "Pier 2", "Pier 3" }; PierClaimLocations main2 = new PierClaimLocations(); main2.Name = "DCI Bullpen"; main2.SubLocations = new string[] { }; PierClaimLocations main3 = new PierClaimLocations(); main3.Name = "Arrivals"; main3.SubLocations = new string[] { "DL Arvl", "OA Arvl", "AS Arvl" }; getPierClaimLocationResponse.MainLocations = new PierClaimLocations[] { main1, main2, main3 }; getPierClaimLocationResponse.StatusCode = "0"; logger.Trace("Service : IRestService , Method : GetPierClaimLocation , Response : GetPierClaimLocationResponse = {'MainLocation':PierResponse.MainLocation, 'ReturnCode':PierResponse.ReturnCode,'Message':PierResponse.Message}"); return(getPierClaimLocationResponse); }