public void SimpleEdmxShouldCallMethodsInOrder()
        {
            string namespacePrefix = string.Empty;
            Context = new ODataT4CodeGenerator.CodeGenerationContext(SimpleEdmx, namespacePrefix);
            ODataClientTemplateImp template = new ODataClientTemplateImp(Context);
            template.WriteNamespace("Namespace1");

            List<string> expectedActions = new List<string>
            {
                "WriteNamespaceStart(Namespace1)",
                "WriteClassStartForEntityContainer(EntityContainer, EntityContainer, EntityContainer)",
                "WriteMethodStartForEntityContainerConstructor(EntityContainer, EntityContainer)",
                "WriteClassEndForEntityContainerConstructor()",
                "WriteGeneratedEdmModel(<edmx:Edmx Version=\"\"4.0\"\" xmlns:edmx=\"\"http://docs.oasis-open.org/odata/ns/edmx\"\">\r\n  <edmx:DataServices>\r\n    <Schema Namespace=\"\"Namespace1\"\" xmlns=\"\"http://docs.oasis-open.org/odata/ns/edm\"\">\r\n      <ComplexType Name=\"\"ComplexType\"\" />\r\n      <EnumType Name=\"\"EnumType\"\" />\r\n      <EntityType Name=\"\"EntityType\"\" Abstract=\"\"true\"\" />\r\n      <EntityContainer Name=\"\"EntityContainer\"\" />\r\n    </Schema>\r\n  </edmx:DataServices>\r\n</edmx:Edmx>)",
                "WriteClassEndForEntityContainer()",
                "WriteSummaryCommentForStructuredType(ComplexType)",
                "WriteClassStartForStructuredType(, ComplexType, ComplexType, )",
                "WriteClassEndForStructuredType()",
                "WriteSummaryCommentForStructuredType(EntityTypeSingle)", 
                "WriteClassStartForStructuredType(, EntityTypeSingle, EntityTypeSingle, ClassInheritDataServiceQuerySingle)",
                "WriteConstructorForSingleType(EntityTypeSingle, DataServiceQuerySingle)",
                "WriteClassEndForStructuredType()",
                "WriteSummaryCommentForStructuredType(EntityType)",
                "WriteEntityTypeAttribute()",
                "WriteClassStartForStructuredType(AbstractModifier, EntityType, EntityType, global::Microsoft.OData.Client.BaseEntityType)",
                "WriteClassEndForStructuredType()",
                "WriteSummaryCommentForEnumType(EnumType)",
                "WriteEnumDeclaration(EnumType, EnumType, )",
                "WriteEnumEnd()",
                "WriteExtensionMethodsStart()",
                "WriteExtensionMethodsEnd()",
                "WriteNamespaceEnd()"
            };
            template.CalledActions.Should().Equal(expectedActions);
        }
        public void OnlyEntityTypeShouldCallWriteEntityType()
        {
            string namespacePrefix = string.Empty;
            Context = new ODataT4CodeGenerator.CodeGenerationContext(EmptyEntityTypeEdmx, namespacePrefix);
            ODataClientTemplateImp template = new ODataClientTemplateImp(Context);
            template.WriteNamespace("Namespace1");

            List<string> expectedActions = new List<string>
            {
                "WriteNamespaceStart(Namespace1)",
                "WriteSummaryCommentForStructuredType(EntityTypeSingle)", 
                "WriteClassStartForStructuredType(, EntityTypeSingle, EntityTypeSingle, ClassInheritDataServiceQuerySingle)",
                "WriteConstructorForSingleType(EntityTypeSingle, DataServiceQuerySingle)",
                "WriteClassEndForStructuredType()",
                "WriteSummaryCommentForStructuredType(EntityType)",
                "WriteEntityTypeAttribute()",
                "WriteClassStartForStructuredType(AbstractModifier, EntityType, EntityType, global::Microsoft.OData.Client.BaseEntityType)",
                "WriteClassEndForStructuredType()",
                "WriteExtensionMethodsStart()",
                "WriteExtensionMethodsEnd()",
                "WriteNamespaceEnd()"
            };
            template.CalledActions.Should().Equal(expectedActions);
        }
        public void OnlyComplexTypeShouldCallWriteComplexType()
        {
            string namespacePrefix = string.Empty;
            Context = new ODataT4CodeGenerator.CodeGenerationContext(OneNamespaceAndEmptyComplexTypeEdmx, namespacePrefix);
            ODataClientTemplateImp template = new ODataClientTemplateImp(Context);
            template.WriteNamespace("Namespace1");

            List<string> expectedActions = new List<string>
            {
                "WriteNamespaceStart(Namespace1)",
                "WriteSummaryCommentForStructuredType(ComplexType)",
                "WriteClassStartForStructuredType(, ComplexType, ComplexType, )",
                "WriteClassEndForStructuredType()",
                "WriteNamespaceEnd()"
            };
            template.CalledActions.Should().Equal(expectedActions);
        }
        public void OnlyEnumTypeShouldCallWriteEnumType()
        {
            string namespacePrefix = string.Empty;
            Context = new ODataT4CodeGenerator.CodeGenerationContext(EmptyEnumTypeEdmx, namespacePrefix);
            ODataClientTemplateImp template = new ODataClientTemplateImp(Context);
            template.WriteNamespace("Namespace1");

            List<string> expectedActions = new List<string>
            {
                "WriteNamespaceStart(Namespace1)",
                "WriteSummaryCommentForEnumType(EnumType)",
                "WriteEnumDeclaration(EnumType, EnumType, )",
                "WriteEnumEnd()",
                "WriteNamespaceEnd()"
            };
            template.CalledActions.Should().Equal(expectedActions);
        }
        public void OnlyEntityContainerShouldCallWriteEntityContainer()
        {
            string namespacePrefix = string.Empty;
            Context = new ODataT4CodeGenerator.CodeGenerationContext(EmptyEntityContainerEdmx, namespacePrefix);
            ODataClientTemplateImp template = new ODataClientTemplateImp(Context);
            template.WriteNamespace("Namespace1");

            List<string> expectedActions = new List<string>
            {
                "WriteNamespaceStart(Namespace1)",
                "WriteClassStartForEntityContainer(EntityContainer, EntityContainer, EntityContainer)",
                "WriteMethodStartForEntityContainerConstructor(EntityContainer, EntityContainer)",
                "WriteClassEndForEntityContainerConstructor()",
                "WriteGeneratedEdmModel(<edmx:Edmx Version=\"\"4.0\"\" xmlns:edmx=\"\"http://docs.oasis-open.org/odata/ns/edmx\"\">\r\n  <edmx:DataServices>\r\n    <Schema Namespace=\"\"Namespace1\"\" xmlns=\"\"http://docs.oasis-open.org/odata/ns/edm\"\">\r\n      <EntityContainer Name=\"\"EntityContainer\"\" />\r\n    </Schema>\r\n  </edmx:DataServices>\r\n</edmx:Edmx>)",
                "WriteClassEndForEntityContainer()",
                "WriteNamespaceEnd()",
            };
            template.CalledActions.Should().Equal(expectedActions);
        }