示例#1
0
            public void When_an_object_is_binary_serializable_it_should_succeed()
            {
                // Arrange
                var subject = new SerializableClass
                {
                    Name = "John",
                    Id   = 2
                };

                // Act
                Action act = () => subject.Should().BeBinarySerializable();

                // Assert
                act.Should().NotThrow();
            }
        public void When_an_object_is_binary_serializable_it_should_succeed()
        {
            //-----------------------------------------------------------------------------------------------------------
            // Arrange
            //-----------------------------------------------------------------------------------------------------------
            var subject = new SerializableClass
            {
                Name = "John"
            };

            //-----------------------------------------------------------------------------------------------------------
            // Act
            //-----------------------------------------------------------------------------------------------------------
            Action act = () => subject.Should().BeBinarySerializable();

            //-----------------------------------------------------------------------------------------------------------
            // Assert
            //-----------------------------------------------------------------------------------------------------------
            act.ShouldNotThrow();
        }
        public void SerializableClass_ShouldBeJsonSerializable()
        {
            var obj = new SerializableClass();

            obj.Should().BeJsonSerializable <SerializableClass>();
        }