public void TryDeserialize_Null() { // arrange var type = new FieldSetType(); // act var success = type.TryDeserialize(null, out object?selectionSet); // assert Assert.True(success); Assert.Null(selectionSet); }
public void TryDeserialize_Invalid_Type() { // arrange var type = new FieldSetType(); const int serialized = 1; // act var success = type.TryDeserialize(serialized, out object?selectionSet); // assert Assert.False(success); Assert.Null(selectionSet); }
public void TryDeserialize() { // arrange var type = new FieldSetType(); const string serialized = "a b c d e(d: $b)"; // act var success = type.TryDeserialize(serialized, out object?selectionSet); // assert Assert.True(success); Assert.IsType <SelectionSetNode>(selectionSet); }