Skip to content

Commit

Permalink
testing shared param file with an ambiguous string in the constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
salaros committed Oct 29, 2019
1 parent 7c1385d commit f2f2325
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/SharedParameterFileTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ public void FileIsSerializedProperly()

Assert.Equal(simpleSharedFromBuiltText, simpleSharedFromDisk);
}

/// <summary>
/// Saves the a catalog to a file.
/// </summary>
Expand All @@ -357,5 +358,14 @@ public void SavingSharedParametersToFile()
var sharedParamFileTmp = $"{Path.GetTempFileName()}.txt";
Assert.True(sharedParamFile.Save(sharedParamFileTmp) && File.Exists(sharedParamFileTmp));
}

/// <summary>
/// Tries to initialize shared param file with an ambiguous string.
/// </summary>
[Fact]
public void SharedParametersFromAmbiguousString()
{
Assert.Throws<InvalidDataException>(() => new SharedParameterFile("abc"));
}
}
}

0 comments on commit f2f2325

Please sign in to comment.