public void WhenSerializing_ThenInvokesSerializer() { var serializer = new FakeSerializer(); var data = new Data(); serializer.Serialize(data); Assert.Same(data, serializer.Data); }
public void WhenSerializingNullGraph_ThenThrowsArgumentNullException() { var serializer = new FakeSerializer(); Assert.Throws <ArgumentNullException>(() => serializer.Serialize <Data>(null)); }