public void FromBsonDocument_should_return_expected_result_when_caseFirst_element_is_present( [Values("lower", "off", "upper")] string caseFirstString) { var document = new BsonDocument { { "locale", "en_US" }, { "caseFirst", caseFirstString } }; var result = Collation.FromBsonDocument(document); result.Alternate.Should().BeNull(); result.Backwards.Should().NotHaveValue(); result.CaseFirst.Should().Be(Collation.ToCollationCaseFirst(caseFirstString)); result.CaseLevel.Should().NotHaveValue(); result.Locale.Should().Be("en_US"); result.MaxVariable.Should().BeNull(); result.Normalization.Should().NotHaveValue(); result.NumericOrdering.Should().NotHaveValue(); result.Strength.Should().BeNull(); }
public void ToCollationCaseFirst_should_return_expected_result(string value, CollationCaseFirst expectedResult) { var result = Collation.ToCollationCaseFirst(value); result.Should().Be(expectedResult); }