Closed dittodhole closed 11 years ago
Also ... shouldn't your test FieldMappingInfoBuilderNumericFieldTests.CopyToDocument
be restated as:
[Test]
public void CopyToDocument()
{
const double theValue = 1.34d;
CustomValueType = new SampleValueType
{
TheValue = theValue
};
var mapper = CreateMapper();
var doc = new Document();
mapper.CopyToDocument(this, doc);
Assert.That(doc.GetFieldable("CustomValueType").TokenStreamValue.ToString(), Is.EqualTo("(numeric,valSize=64,precisionStep=4)"));
Assert.That(doc.GetFieldable("CustomValueType").StringValue, Is.EqualTo(theValue.ToString()));
}
This style of number-formatting may also apply to the other test-method...
Fixed in 690e01a89a4df7d61ea4470858d343e1287fa018 using suggested method.
You have two test-methods, which actually fail on systems with german culture:
FieldMappingInfoBuilderNumericFieldTests.CopyFromDocument
FieldMappingInfoBuilderNumericFieldTests.CopyToDocument
I suppose you somehow inject an invariant
CultureInfo
-instance (or by attribution) into your reflection based mapping.