예제 #1
0
        public void TestAddConfig()
        {
            OptionService service  = GetService();
            var           account1 = service.AddAccount("account1", "*****@*****.**");

            var appli       = service.AddApplication(account1.Id, "appl1");
            var environment = service.AddEnvironment(account1.Id, "env1");
            var type        = service.AddType(account1.Id, "type1", ".json", "validation1", "");

            service.AddOption(account1.Id, "appl1", "env1", "type1", "maconfig", "maconfig");


            var i = service.Option(account1.Id, "appl1", "env1", "maconfig", "type1");
        }
예제 #2
0
        public void TestAddType()
        {
            OptionService service  = GetService();
            var           account1 = service.AddAccount("account1", "*****@*****.**");

            var type1 = service.AddType(account1.Id, "type", ".json", "Validator", "");
            var env2  = service.GetTypes(account1.Id).FirstOrDefault(c => c.Id == type1.Id);

            Assert.AreEqual(env2, type1);
            service.DeleteType(type1);
            var srv = service.GetTypes(account1.Id).FirstOrDefault(c => c.Id == type1.Id);

            Assert.AreEqual(srv, null);
        }