Пример #1
0
        public void WhenSerializing_ThenInvokesSerializer()
        {
            var serializer = new FakeSerializer();
            var data       = new Data();

            serializer.Serialize(data);

            Assert.Same(data, serializer.Data);
        }
Пример #2
0
        public void WhenSerializingNullGraph_ThenThrowsArgumentNullException()
        {
            var serializer = new FakeSerializer();

            Assert.Throws <ArgumentNullException>(() => serializer.Serialize <Data>(null));
        }