Ejemplo n.º 1
0
        public void Test_Writing_An_Instance_Of_A_Tree_With_Height_1()
        {
            IDataNode rootNode = TreeWithHeight1.Build();

            TreeWithHeight1.Class value = new TreeWithHeight1.Class
            {
                Int   = 1,
                Float = 2.5f,
                Byte  = 3
            };

            treeWriter.Write(binaryWriter, value, rootNode)
            .Should()
            .BeEmpty();

            Received.InOrder(() => VerifyWriteTreeWithHeight1(rootNode, value));
        }
Ejemplo n.º 2
0
        public void Test_Reading_An_Instance_Of_A_Tree_With_Height_1()
        {
            IDataNode rootNode = TreeWithHeight1.Build();

            TreeWithHeight1.Class expected = new TreeWithHeight1.Class
            {
                Int   = 1,
                Float = 2.5f,
                Byte  = 3
            };

            SetupTreeWithHeight1(rootNode, expected);

            object result = treeReader.Read(binaryReader, rootNode);

            Received.InOrder(() => VerifyReadTreeWithHeight1(rootNode));

            result.Should().BeEquivalentTo(expected);
        }