From f2f23255afd8ac0a1c4253e8ed3f3218b0efd006 Mon Sep 17 00:00:00 2001 From: Yaroslav Zhmayev Date: Tue, 29 Oct 2019 16:04:27 +0300 Subject: [PATCH] testing shared param file with an ambiguous string in the constructor --- tests/SharedParameterFileTests.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/SharedParameterFileTests.cs b/tests/SharedParameterFileTests.cs index 8e1df06..6456326 100644 --- a/tests/SharedParameterFileTests.cs +++ b/tests/SharedParameterFileTests.cs @@ -343,6 +343,7 @@ public void FileIsSerializedProperly() Assert.Equal(simpleSharedFromBuiltText, simpleSharedFromDisk); } + /// /// Saves the a catalog to a file. /// @@ -357,5 +358,14 @@ public void SavingSharedParametersToFile() var sharedParamFileTmp = $"{Path.GetTempFileName()}.txt"; Assert.True(sharedParamFile.Save(sharedParamFileTmp) && File.Exists(sharedParamFileTmp)); } + + /// + /// Tries to initialize shared param file with an ambiguous string. + /// + [Fact] + public void SharedParametersFromAmbiguousString() + { + Assert.Throws(() => new SharedParameterFile("abc")); + } } }