Ejemplo n.º 1
0
            public void When_an_object_is_data_contract_serializable_it_should_succeed()
            {
                // Arrange
                var subject = new DataContractSerializableClass
                {
                    Name = "John",
                    Id   = 1
                };

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

                // Assert
                act.Should().NotThrow();
            }
        public void When_an_object_is_data_contract_serializable_it_should_succeed()
        {
            //-----------------------------------------------------------------------------------------------------------
            // Arrange
            //-----------------------------------------------------------------------------------------------------------
            var subject = new DataContractSerializableClass
            {
                Name = "John",
                Id = 1
            };

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

            //-----------------------------------------------------------------------------------------------------------
            // Assert
            //-----------------------------------------------------------------------------------------------------------
            act.ShouldNotThrow();
        }