private ValueTuple Tuple(params object[] objs) { Value[] values = new Value[objs.Length]; for (int i = 0; i < values.Length; i++) { values[i] = Values.Of(objs[i]); } return(ValueTuple.Of(values)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldBeAbleToThrowFromValueWriter() internal virtual void ShouldBeAbleToThrowFromValueWriter() { // Given Value value = Values.Of("This is a value"); //JAVA TO C# CONVERTER TODO TASK: Method reference constructor syntax is not converted by Java to C# Converter: ValueWriter <TestException> writer = throwing(TestException::new); // Expect assertThrows(typeof(TestException), () => value.writeTo(writer)); }
public static ValueTuple Of(params object[] objects) { Debug.Assert(objects.Length > 0, "Empty ValueTuple is not allowed"); Debug.Assert(NoNulls(objects)); Value[] values = new Value[objects.Length]; for (int i = 0; i < values.Length; i++) { values[i] = Values.Of(objects[i]); } return(new ValueTuple(values)); }
private static WriteTest ShouldWrite(object value, params object[] expected) { return(new WriteTest(Values.Of(value), expected)); }
internal Test(Value a, object b, bool shouldMatch) { this.A = a; this.B = Values.Of(b); this.ShouldMatch = shouldMatch; }