public string VerifyTemplateData() { try { Assert.IsTrue(_CreateLoadPage.PickUpFacility.GetValue().Equals(_CreateLoadData.PickupFacility)); Assert.IsTrue(_CreateLoadPage.DeliveryFacility.GetValue().Equals(_StopData.DeliveryFacility)); Assert.IsTrue(_CreateLoadPage.EquipmentType.CompareDDMyOptions(new List<string>() { _CreateLoadData.EquipmentType })); Assert.IsTrue(_CreateLoadPage.MinimumLength.CompareDDMyOptions(new List<string>() { _CreateLoadData.MinimumLength })); Assert.IsTrue(_CreateLoadPage.Notes.GetValue().Equals(_CreateLoadData.Notes)); Commodity_CreateLoad firstcommodity = _CreateLoadPage.Stops.First().Commodity.First(); Assert.IsTrue(firstcommodity.Description.CompareDDMyOptions(new List<string>() { _CommodityData.Description })); Assert.IsTrue(firstcommodity.Weight.GetValue().Equals(_CommodityData.Weight)); Assert.IsTrue(firstcommodity.Quantity.GetValue().Equals(_CommodityData.Quantity)); Assert.IsTrue(firstcommodity.PackagingTypes.CompareDDMyOptions(new List<string>() { _CommodityData.PackagingType })); Assert.IsTrue(firstcommodity.Pallets.GetValue().Equals(_CommodityData.Pallets)); Assert.IsTrue(firstcommodity.Length.GetValue().Equals(_CommodityData.Length)); Assert.IsTrue(firstcommodity.Width.GetValue().Equals(_CommodityData.Width)); Assert.IsTrue(firstcommodity.Height.GetValue().Equals(_CommodityData.Height)); Assert.IsTrue(firstcommodity.Value.GetValue().Equals(_CommodityData.Value)); return "VerificationSuccess"; } catch { return "VerificationFailed"; } }
public string CommodityDetails_Fill() { try { Commodity_CreateLoad lastcommodity = _CreateLoadPage.Stops.Last().Commodity.Last(); Assert.IsTrue(_CommodityDetails_Fill(lastcommodity)); return "CommodityDetailsFilled"; } catch { return "CommodityDetailsFailed"; } }
private bool _CommodityDetails_Fill(Commodity_CreateLoad lastcommodity) { try { Assert.IsTrue(lastcommodity.Description.ClearAndEdit(_CommodityData.Description)); Assert.IsTrue(lastcommodity.Weight.ClearAndEdit(_CommodityData.Weight)); Assert.IsTrue(lastcommodity.Quantity.ClearAndEdit(_CommodityData.Quantity)); Assert.IsTrue(lastcommodity.PackagingTypes.SelectByText(_CommodityData.PackagingType)); Assert.IsTrue(lastcommodity.Pallets.ClearAndEdit(_CommodityData.Pallets)); Assert.IsTrue(lastcommodity.Length.ClearAndEdit(_CommodityData.Length)); Assert.IsTrue(lastcommodity.Width.ClearAndEdit(_CommodityData.Width)); Assert.IsTrue(lastcommodity.Height.ClearAndEdit(_CommodityData.Height)); Assert.IsTrue(lastcommodity.Value.ClearAndEdit(_CommodityData.Value)); return true; } catch { return false; } }