Exemple #1
0
        public void TestCyclic()
        {
            var a = new CyclicA();
            var b = new CyclicB();
            a.B = b;
            b.A = a;

            Test(a);
        }
Exemple #2
0
        public void TestCyclic()
        {
            var a = new CyclicA();
            var b = new CyclicB();

            a.B = b;
            b.A = a;

            Test(a);
        }
        public override void Setup(BenchmarkContext context)
        {
            base.Setup(context);

            var a = new CyclicA();
            var b = new CyclicB();

            a.B = b;
            b.A = a;

            InitStreamWith(a);
        }
        public override void Setup(BenchmarkContext context)
        {
            base.Setup(context);
            _testStruct = LargeStruct.Create();
            _testObject = TypicalPersonData.MakeRandom();

            var a = new CyclicA();
            var b = new CyclicB();

            a.B = b;
            b.A = a;

            _cyclic = a;
        }
Exemple #5
0
        //[Fact]
        public void should_throw_exception_with_cyclic_dependency()
        {
            var a = new CyclicA();
            var b = new CyclicB();

            a.References = b;
            b.References = a;

            var serializer = new JsonSerializer(_mappingRegistry);

            Assert.Throws <Exception>(() =>
            {
                var output = serializer.Serialize(a);
                _testOutputHelper.WriteLine(output.AsString);
            });
        }
Exemple #6
0
 public CyclicB(CyclicA a)
 {
 }
Exemple #7
0
 public CyclicB(CyclicA dependency)
 {
     this.dependency = dependency;
 }