Пример #1
0
        public void TryMatch_ReturnsTrue_IfThePathSegmentRefersToSameAction()
        {
            // Arrange
            Mock <IEdmAction> edmAction = new Mock <IEdmAction>();

            edmAction.Setup(a => a.Namespace).Returns("NS");
            edmAction.Setup(a => a.Name).Returns("SomeAction");

            BoundActionPathSegment      pathSegmentTemplate = new BoundActionPathSegment(edmAction.Object);
            BoundActionPathSegment      pathSegment         = new BoundActionPathSegment(edmAction.Object);
            Dictionary <string, object> values = new Dictionary <string, object>();

            // Act & Assert
            Assert.True(pathSegmentTemplate.TryMatch(pathSegment, values));
            Assert.Empty(values);
        }
        public void TryMatch_ReturnsTrue_IfThePathSegmentRefersToSameAction()
        {
            // Arrange
            Mock<IEdmAction> edmAction = new Mock<IEdmAction>();
            edmAction.Setup(a => a.Namespace).Returns("NS");
            edmAction.Setup(a => a.Name).Returns("SomeAction");

            BoundActionPathSegment pathSegmentTemplate = new BoundActionPathSegment(edmAction.Object);
            BoundActionPathSegment pathSegment = new BoundActionPathSegment(edmAction.Object);
            Dictionary<string, object> values = new Dictionary<string, object>();

            // Act & Assert
            Assert.True(pathSegmentTemplate.TryMatch(pathSegment, values));
            Assert.Empty(values);
        }