Skip to content

Commit f2f2325

Browse files
committed
testing shared param file with an ambiguous string in the constructor
1 parent 7c1385d commit f2f2325

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/SharedParameterFileTests.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ public void FileIsSerializedProperly()
343343

344344
Assert.Equal(simpleSharedFromBuiltText, simpleSharedFromDisk);
345345
}
346+
346347
/// <summary>
347348
/// Saves the a catalog to a file.
348349
/// </summary>
@@ -357,5 +358,14 @@ public void SavingSharedParametersToFile()
357358
var sharedParamFileTmp = $"{Path.GetTempFileName()}.txt";
358359
Assert.True(sharedParamFile.Save(sharedParamFileTmp) && File.Exists(sharedParamFileTmp));
359360
}
361+
362+
/// <summary>
363+
/// Tries to initialize shared param file with an ambiguous string.
364+
/// </summary>
365+
[Fact]
366+
public void SharedParametersFromAmbiguousString()
367+
{
368+
Assert.Throws<InvalidDataException>(() => new SharedParameterFile("abc"));
369+
}
360370
}
361371
}

0 commit comments

Comments
 (0)