예제 #1
0
        public void TestReplaceItemInterfaceNetworkIf()
        {
            ACConfig TestAc = new ACConfig()
            {
                configureNetwork = new ConfigureNetwork()
                {
                    interfacenetworkif = new List <Interfacenetworkif>()
                }
            };
            Interfacenetworkif INI = new Interfacenetworkif()
            {
                listid = 21,
                Name   = "blub"
            };

            TestAc.configureNetwork.interfacenetworkif.Add(INI);
            List <Interfacenetworkif> list     = new List <Interfacenetworkif>();
            Interfacenetworkif        OtherINI = new Interfacenetworkif()
            {
                listid = 21,
                Name   = "blup"
            };

            list.Add(OtherINI);
            var what = "interfacenetworkif";

            TestAc = new TestMainProgramm().replaceitem(TestAc, list, what);
            Assert.True(TestAc.configureNetwork.interfacenetworkif[0].Name == "blup");
        }
        public void TestReplaceItemInterfaceNetworkIf()
        {
            ACConfig TestAc = new ACConfig()
            {
                configureNetwork = new ConfigureNetwork()
                {
                    interfacenetworkif = new List <Interfacenetworkif>()
                }
            };
            Interfacenetworkif INI = new Interfacenetworkif()
            {
                listid = 21,
                Name   = "blub_-"
            };

            TestAc.configureNetwork.interfacenetworkif.Add(INI);
            List <Interfacenetworkif> list     = new List <Interfacenetworkif>();
            Interfacenetworkif        OtherINI = new Interfacenetworkif()
            {
                listid = 21,
                Name   = "blup_-"
            };

            list.Add(OtherINI);
            var           what    = "interfacenetworkif";
            CommandOption country = new CommandOption("--blub", CommandOptionType.SingleValue);

            country.Values.Add("de");
            TestAc = new TestMainProgramm().replaceitem(TestAc, list, what, country, new CommandOption("--blub", CommandOptionType.SingleValue));
            Assert.True(TestAc.configureNetwork.interfacenetworkif[0].Name == "blup_-de");
        }
예제 #3
0
        public void ObjectToListInterfaceNetworkIfNotNull()
        {
            AC = new ACConfig()
            {
                configureNetwork = new ConfigureNetwork()
                {
                    interfacenetworkif = new List <Interfacenetworkif>()
                }
            };
            Interfacenetworkif INI = new Interfacenetworkif()
            {
                Name = "TestName"
            };

            AC.configureNetwork.interfacenetworkif.Add(INI);
            testreturnConfigList = new TestOutput().objectToList(AC);
            Assert.NotEmpty(testreturnConfigList);
        }