diff --git a/ConnectorGSA/ConnectorGSATests/SchemaTests.cs b/ConnectorGSA/ConnectorGSATests/SchemaTests.cs index 004781e7c0..46826d3930 100644 --- a/ConnectorGSA/ConnectorGSATests/SchemaTests.cs +++ b/ConnectorGSA/ConnectorGSATests/SchemaTests.cs @@ -1238,6 +1238,16 @@ public void GsaMemb1dSimple() //Assert.True(ModelValidation(gwaToTest, GsaRecord.GetKeyword(), 3, out var mismatch)); } + [Fact] + public void GsaMemb2dFromGwa_WithEmptyPointNodeIndices_ReturnsTrue() + { + var gsaMemb2d = "MEMB.8\t5730\t\tNO_RGB\t2D_GENERIC\tALL\t3\t0\t21759 4928 4927 21762 21759 P()\t0\t0\t0\tYES\tLINEAR\t0\t0\t0\t0\t0\t0\tACTIVE\t0\tNO\tREBAR_2D.1\t0.03\t0.03\t0"; + + var memParser = new GsaMembParser(); + + Assert.True(memParser.FromGwa(gsaMemb2d)); + } + [Fact (Skip = "WIP")] public void GsaMemb2dSimple() { diff --git a/ConnectorGSA/GSAProxy/GwaParsers/GsaMembParser.cs b/ConnectorGSA/GSAProxy/GwaParsers/GsaMembParser.cs index ebaad293b1..a86aba7ed0 100644 --- a/ConnectorGSA/GSAProxy/GwaParsers/GsaMembParser.cs +++ b/ConnectorGSA/GSAProxy/GwaParsers/GsaMembParser.cs @@ -267,7 +267,7 @@ protected bool AddName(string v) } private bool AddTopology(string v) { - var bracketPieces = v.Split(new[] { '(', ')' }).Select(s => s.Trim()).ToList(); + var bracketPieces = v.Split(new[] { '(', ')' }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToList(); if (bracketPieces.Count() > 1) { var listTypes = bracketPieces.Take(bracketPieces.Count() - 1).Select(bp => bp.Last()).ToList();