public void btnSave_Click_FeatureServiceIdAndFeatureIdAboveZero_SaveFeatureMap() { //Arrange const string ServiceIdColumn = "ServiceID"; const string FeatureIdCollumn = "ServiceFeatureID"; const string MapIdColumn = "MAPID"; const string IsAdditionalCostColumn = "IsAdditionalCost"; const string IdColumn = "ID"; var item = new TreeListDataItem(_tlClientGroupServiceFeatures, 0, false); var serviceId = GetAnyNumber(); var featureId = GetAnyNumber(); var mapId = GetAnyNumber(); var row = new Dictionary <string, string> { { ServiceIdColumn, serviceId.ToString() }, { FeatureIdCollumn, featureId.ToString() }, { MapIdColumn, mapId.ToString() }, { IsAdditionalCostColumn, GetAnyNumber().ToString() }, { IdColumn, $"S{serviceId}" } }; item.ExtractValues(row); _tlClientGroupServiceFeatures.Items.Add(item); item.Selected = true; ShimTreeListDataItem.AllInstances.ItemGetString = (instance, key) => { return(new TableCell { Text = row[key] }); }; //Act CallbtnSave_Click(); //Assert _clientGroupServiceFeatureMapPassedToSave.ShouldSatisfyAllConditions( () => _clientGroupServiceFeatureMapPassedToSave.ShouldNotBeNull(), () => _clientGroupServiceFeatureMapPassedToSave.ClientGroupServiceFeatureMapID.ShouldBe(mapId), () => _clientGroupServiceFeatureMapPassedToSave.ServiceID.ShouldBe(serviceId), () => _clientGroupServiceFeatureMapPassedToSave.ServiceFeatureID.ShouldBe(featureId)); }