Exemplo n.º 1
0
        public void TestCopier()
        {
            OuterComponent source      = OuterComponent.Arbitrary;
            var            destination = new OuterComponent();

            destination.CopyFrom(source);
            Assert.IsTrue(destination.EqualTo(source));
        }
        public void TestSerializer()
        {
            OuterComponent arbitrary = OuterComponent.Arbitrary;
            var            stream    = new MemoryStream();

            arbitrary.Serialize(stream);

            var deserialized = new OuterComponent();

            stream.Position = 0;
            deserialized.Deserialize(stream);

            Assert.IsTrue(arbitrary.EqualTo(deserialized));
            Assert.AreNotSame(arbitrary.inner, deserialized.inner);
        }
Exemplo n.º 3
0
        public void TestEquals()
        {
            OuterComponent c1 = OuterComponent.Arbitrary, c2 = OuterComponent.Arbitrary;

            Assert.IsTrue(c1.EqualTo(c2));
        }
Exemplo n.º 4
0
        public void TestClone()
        {
            OuterComponent component = OuterComponent.Arbitrary;

            Assert.IsTrue(component.EqualTo(component.Clone()));
        }