コード例 #1
0
        public void WriteJson_NullSerializer_ThrowsException()
        {
            // Arrange
            var birthNumberJsonConverter = new BirthNumberJsonConverter();

            // Act + Assert
            Assert.That(() => birthNumberJsonConverter.WriteJson(new JsonTextWriter(new StreamWriter(new MemoryStream())), 0, null), Throws.InstanceOf<ArgumentNullException>());
        }
コード例 #2
0
        public void WriteJson_NullWriter_ThrowsException()
        {
            // Arrange
            var birthNumberJsonConverter = new BirthNumberJsonConverter();

            // Act + Assert
            Assert.That(() => birthNumberJsonConverter.WriteJson(null, 0, new JsonSerializer()), Throws.InstanceOf<ArgumentNullException>());
        }