public void TryTranslateActionSegmentTemplate_ThrowsArgumentNull_Context()
        {
            // Arrange
            EdmAction             action   = new EdmAction("NS", "action", null, true, null);
            ActionSegmentTemplate template = new ActionSegmentTemplate(action, null);

            // Act & Assert
            ExceptionAssert.ThrowsArgumentNull(() => template.TryTranslate(null), "context");
        }
        public void TryTranslateActionSegmentTemplate_ReturnsODataActionImportSegment()
        {
            // Arrange
            EdmAction                     action   = new EdmAction("NS", "action", null, true, null);
            ActionSegmentTemplate         template = new ActionSegmentTemplate(action, null);
            ODataTemplateTranslateContext context  = new ODataTemplateTranslateContext();

            // Act
            bool ok = template.TryTranslate(context);

            // Assert
            Assert.True(ok);
            ODataPathSegment actual        = Assert.Single(context.Segments);
            OperationSegment actionSegment = Assert.IsType <OperationSegment>(actual);

            Assert.Same(action, actionSegment.Operations.First());
        }