Пример #1
0
        public void ReadBytes_should_create_a_schema_object_from_a_serialized_schema_object()
        {
            // Arrange
            var sut = CreateSchema();
            var actual = new Schema();
            string serializedData1, serializedData2;

            // Act
            serializedData1 = Encoding.Default.GetString(sut.ToBytes());

            actual.ReadBytes(Encoding.UTF8.GetBytes(serializedData1));

            serializedData2 = Encoding.Default.GetString(actual.ToBytes());

            // Assert
            Assert.AreEqual(serializedData1, serializedData2);
        }