Пример #1
0
		private void TestLoadTree(SerializationLoader loader, IItemData root, IDeserializeFailureRetryer retryer = null, IConsistencyChecker consistencyChecker = null)
		{
			if (retryer == null) retryer = Substitute.For<IDeserializeFailureRetryer>();
			if (consistencyChecker == null)
			{
				var checker = Substitute.For<IConsistencyChecker>();
				checker.IsConsistent(Arg.Any<IItemData>()).Returns(true);
				consistencyChecker = checker;
			}

			loader.LoadTree(root, retryer, consistencyChecker);
		}
Пример #2
0
        private void TestLoadTree(SerializationLoader loader, ISerializedItem root, IDeserializeFailureRetryer retryer = null, IConsistencyChecker consistencyChecker = null)
        {
            if (retryer == null) retryer = new Mock<IDeserializeFailureRetryer>().Object;
            if (consistencyChecker == null)
            {
                var checker = new Mock<IConsistencyChecker>();
                checker.Setup(x => x.IsConsistent(It.IsAny<ISerializedItem>())).Returns(true);
                consistencyChecker = checker.Object;
            }

            loader.LoadTree(root, retryer, consistencyChecker);
        }