//FUNCTIONAL TESTS public static void UOWFunctionalCheck() { //GET CLASS Managers.Manager mngCl = new Managers.Manager("dev_db", null); IOrientRepo rp = mngCl.GetRepo(); GetClass gc = rp.GetClass <Person>("dev_db", null); //Managers.Manager mng = new Managers.Manager(ConfigurationManager.AppSettings["OrientDevDB"],null); Managers.Manager mng = new Managers.Manager(ConfigurationManager.AppSettings["OrientUnitTestDB"], null); Managers.Manager mngSource = new Managers.Manager(ConfigurationManager.AppSettings["OrientSourceDB"], null); PersonUOWs.PersonUOW pu = mng.GetPersonUOW(); NewsUOWs.NewsRealUow nu = mng.GetNewsUOW(); Managers.Manager mngPerson = new Managers.Manager(ConfigurationManager.AppSettings["OrientSourceDB"]); PersonUOWs.PersonUOW personToGetUOW = mngPerson.GetPersonUOW(); POCO.News newsToAdd0 = new News() { GUID = "119", content = "s \"a \"a t " }; POCO.Person newsMaker = pu.SearchByName("Neprintsevia").FirstOrDefault(); POCO.Person likeMaker = pu.SearchByName("Person1").FirstOrDefault(); POCO.Person troubleMaker = pu.SearchByName("Person0").FirstOrDefault(); GETparameters gp = new GETparameters() { offest = 5, published = true, pinned = true, asc = true, author = newsMaker }; JSONManager jm = new JSONManager(); //ABSENT PERSON CHECK Random rnd = new Random(); //News ns = nu.GetNewsByGUID("2370b972-48d4-4e49-95ad-b99ba5382042"); //News ns = nu.GetNewsByGUID("e7bc87ec-f649-4748-b4cb-d2863f780f1c"); //nu.GetNewsByGUID("f7557c27-f889-4aab-91ce-ba15e34e3981"); //News ns = nu.GetNewsByGUID("f7557c27-f889-4aab-91ce-ba15e34e3981"); var a = nu.GetNews(5, null, null); int acc = (int)rnd.Next(0, 10000); Person personAbsent = new Person() { Name = "PersonAbsent", sAMAccountName = "absent" + acc }; string newsContent = "{\"conntent_\":\"news text\",\"name\":\"News name\"}"; }
static NewsUOWs.NewsRealUow ActualNewsUOW() { NewsUOWs.NewsRealUow newsUow = new NewsUOWs.NewsRealUow(DefaultManagerInit(ConfigurationManager.AppSettings["OrientUnitTestDB"])); return(newsUow); }