Inheritance: IProxyBuilderHelper
        public void ControllerSuffix_Null_LowerFirstChar_True()
        {
            //Arrange
            var proxyBuilder = new ProxyBuilderHelper(new ProxySettings() { LowerFirstCharInFunctionName = true });

            //Act
            var name = proxyBuilder.GetServiceName("Ho", null, true);

            //Assert
            Assert.AreEqual(name, "ho");
        }
        public void LowerFirstChar_False()
        {
            //Arrange
            var proxyBuilder = new ProxyBuilderHelper(new ProxySettings() { LowerFirstCharInFunctionName = false });

            //Act
            var name = proxyBuilder.GetServiceName("Home", "PSrv", false);

            //Assert
            Assert.AreEqual(name, "HomePSrv");
        }
        public void TypeScriptFile_Extensions()
        {
            //Arrange
            var proxyBuilder = new ProxyBuilderHelper(new ProxySettings());

            //Act
            var name = proxyBuilder.GetProxyFileName("Home", "PSrv", "ts");

            //Assert
            Assert.AreEqual(name, "homePSrv.ts");
        }
        public void ControllerName_Two_CharLength()
        {
            //Arrange
            var proxyBuilder = new ProxyBuilderHelper(new ProxySettings() { LowerFirstCharInFunctionName = true });

            //Act
            var name = proxyBuilder.GetServiceName("Ho", "PSrv",true);

            //Assert
            Assert.AreEqual(name, "hoPSrv");
        }
        public void Suffix_IsNull()
        {
            //Arrange
            var proxyBuilder = new ProxyBuilderHelper(new ProxySettings());

            //Act
            var name = proxyBuilder.GetProxyFileName("home", null, "js");

            //Assert
            Assert.AreEqual(name, "home.js");
        }
        public void ControllerName_Two_Letters()
        {
            //Arrange
            var proxyBuilder = new ProxyBuilderHelper(new ProxySettings());

            //Act
            var name = proxyBuilder.GetProxyFileName("Ho", "PSrv", "js");

            //Assert
            Assert.AreEqual(name, "hoPSrv.js");
        }
        public void LowerFirstChar_True_Methodname_Two_CharLength()
        {
            //Arrange
            var proxyBuilder = new ProxyBuilderHelper(new ProxySettings() { LowerFirstCharInFunctionName = true });

            //Act
            var name = proxyBuilder.GetProxyFunctionName("Ge");

            //Assert
            Assert.AreEqual(name, "ge");
        }
        public void LowerFirstChar_True()
        {
            //Arrange
            var proxyBuilder = new ProxyBuilderHelper(new ProxySettings() { LowerFirstCharInFunctionName = true});

            //Act
            var name = proxyBuilder.GetProxyFunctionName("GetMember");

            //Assert
            Assert.AreEqual(name, "getMember");
        }
        public void With_Controller_Suffix()
        {
            //Arrange
            var testClassType = Assembly.GetExecutingAssembly().GetTypes().First(type => type.Name.Contains("MeinTestController"));
            var proxyBuildHelper = new ProxyBuilderHelper(new ProxySettings());

            //Act
            var clearName = proxyBuildHelper.GetClearControllerName(testClassType);

            //Assert
            Assert.AreEqual(clearName, "MeinTest");
        }
 public void Setup()
 {
     ProxyBuildHelper = new ProxyBuilderHelper(new ProxySettings());
 }
 public void Setup()
 {
     //Aus der Aktuellen Test DLL DEN Typen ermitteln in dem der Name "GetFunctionParametersOneParam" vorkommt, sollte nur einen Typen geben!
     //Achtung Private "Sub" Klasse!
     TestClassType = Assembly.GetExecutingAssembly().GetTypes().First(type => type.Name.Contains("GetFunctionParametersOneParam"));
     ProxyBuildHelper = new ProxyBuilderHelper(new ProxySettings());
 }