public static void InitIntro(AnimationService animationService, int introspeedincrease) { //two groups of four from top for (int i = 0; i < 5; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i, i * Constants.BugIntroSpacing, new Intro1(), Sprite.SpriteTypes.BlueBug, 1, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 4)); } for (int i = 0; i < 5; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 4, i * Constants.BugIntroSpacing, new Intro2(), Sprite.SpriteTypes.RedBug, 1, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 4)); } //two groups of eight from bottom for (int i = 0; i < 8; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 8, i * Constants.BugIntroSpacing, new Intro3(), i % 2 != 0 ? Sprite.SpriteTypes.GreenBug : Sprite.SpriteTypes.RedBug, 2, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0)); } for (int i = 0; i < 8; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 16, i * Constants.BugIntroSpacing, new Intro4(), Sprite.SpriteTypes.RedBug, 3, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0)); } //two groups of eight from top for (int i = 0; i < 9; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 24, i * Constants.BugIntroSpacing, new Intro1(), Sprite.SpriteTypes.BlueBug, 4, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 8)); } for (int i = 0; i < 9; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 32, i * Constants.BugIntroSpacing, new Intro2(), Sprite.SpriteTypes.BlueBug, 5, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 8)); } }
public static void InitIntro(AnimationService animationService, int introspeedincrease) { //two groups of four from top for (int i = 0; i < 4; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i, i * Constants.BugIntroSpacing, new Challenge1(), Sprite.SpriteTypes.BlueBug, 1, introspeedincrease, false)); } for (int i = 0; i < 4; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 4, i * Constants.BugIntroSpacing, new Challenge2(), Sprite.SpriteTypes.BlueBug, 1, introspeedincrease, false)); } //two groups of eight from bottom for (int i = 0; i < 8; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 8, i * Constants.BugIntroSpacing, new Challenge3(), i % 2 != 0 ? Sprite.SpriteTypes.GreenBug : Sprite.SpriteTypes.BlueBug, 2, introspeedincrease, false)); } for (int i = 0; i < 8; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 16, i * Constants.BugIntroSpacing, new Challenge4(), Sprite.SpriteTypes.BlueBug, 3, introspeedincrease, false)); } //two groups of eight from top for (int i = 0; i < 8; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 24, i * Constants.BugIntroSpacing, new Challenge5(), Sprite.SpriteTypes.BlueBug, 4, introspeedincrease, false)); } for (int i = 0; i < 8; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 32, i * Constants.BugIntroSpacing, new Challenge6(), Sprite.SpriteTypes.BlueBug, 5, introspeedincrease, false)); } }
public static void Main() { String qcUrl = "http://qcurl.com:8080/qcbin"; String qcDomain = ""; // Nearly all our projects are under DEFAULT domain String qcProject = ""; // Project we want to log a defect to String qcLoginName = ""; // User account we'll use to log it String qcPassword = ""; // Password for user account TDConnection connection = new TDConnection(); // Open blank connection connection.InitConnectionEx(qcUrl); // Go to qcUrl connection.ConnectProjectEx(qcDomain, qcProject, qcLoginName, qcPassword); // Validate credentials through API BugFactory bugFactory = connection.BugFactory; // Create an object from BugFactory Bug newBug = bugFactory.AddItem(System.DBNull.Value); // Create a new blank bug, must convert C# Null object type into value of Null type // Set values for mandatory fields in new bug // Values are arbitrary newBug.Status = "New"; newBug.AssignedTo = qcLoginName; newBug.DetectedBy = qcLoginName; newBug.Summary = "This is a test defect"; newBug["BG_SEVERITY"] = "3-Test"; newBug["BG_DESCRIPTION"] = "This is a test defect"; newBug["BG_DETECTED_IN_RCYC"] = 1002; // This takes the Release ID from release module, not the string value of its name, unlike every other field. newBug["BG_DETECTION_DATE"] = System.DateTime.Today; // Post the bug newBug.Post(); }
public void Update(Models.Bug model) { var appDbEntity = _appRepository.Get(model.Version); var appModel = AppFactory.Create(appDbEntity); model.App = appModel; var entity = BugFactory.Create(model); _bugRepository.Update(entity); }
public static void InitIntro(AnimationService animationService, int introspeedincrease) { //two groups of four from top for (int i = 0; i < 5; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i, i * Constants.BugIntroSpacing, new Intro1(), Sprite.SpriteTypes.BlueBug, 1, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 4)); } for (int i = 0; i < 5; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 4, i * Constants.BugIntroSpacing, new Intro2(), Sprite.SpriteTypes.RedBug, 1, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 4)); } //two groups of stacked eight from bottom for (int i = 1; i < 10; i += 2) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 8, (i * Constants.BugIntroSpacing) / 2, new Intro3(), Sprite.SpriteTypes.GreenBug, 2, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 9)); } for (int i = 0; i < 11; i += 2) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 8, (i * Constants.BugIntroSpacing) / 2, new Intro5(), Sprite.SpriteTypes.RedBug, 2, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 10)); } for (int i = 0; i < 5; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 16, i * Constants.BugIntroSpacing, new Intro4(), Sprite.SpriteTypes.RedBug, 3, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 4)); } for (int i = 0; i < 5; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 20, i * Constants.BugIntroSpacing, new Intro6(), Sprite.SpriteTypes.RedBug, 3, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 4)); } //two groups of stacked eight from top for (int i = 0; i < 5; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 24, i * Constants.BugIntroSpacing, new Intro2(), Sprite.SpriteTypes.BlueBug, 4, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 4)); } for (int i = 0; i < 5; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 28, i * Constants.BugIntroSpacing, new Intro7(), Sprite.SpriteTypes.BlueBug, 4, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 4)); } for (int i = 0; i < 5; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 32, i * Constants.BugIntroSpacing, new Intro1(), Sprite.SpriteTypes.BlueBug, 5, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 4)); } for (int i = 0; i < 5; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 36, i * Constants.BugIntroSpacing, new Intro8(), Sprite.SpriteTypes.BlueBug, 5, introspeedincrease, Utils.Rnd(1, 10) % 2 == 0, i == 4)); } }
public IEnumerable <BugModel> List() { var bugs = new List <BugModel>(); foreach (var bugDbEntity in _bugRepository.List()) { var appDbEntity = _appRepository.Get(bugDbEntity.AppId); bugDbEntity.App = appDbEntity; bugs.Add(BugFactory.Create(bugDbEntity)); } return(bugs); }
public void Add(BugModel model) { var appDbEntity = _appRepository.Get(model.Version); model.App = AppFactory.Create(appDbEntity); var entity = BugFactory.Create(model); entity.App = appDbEntity; _bugRepository.Add(entity); model.Id = entity.Id; }
public CreateDefect() { TDConnection connection = Connect("qcUrl", "qcDomain", "qcProject", "qcLoginName", "qcPassword"); BugFactory bugFactory = connection.BugFactory; Bug bug = bugFactory.AddItem(null); bug.Status = "New"; bug.Project = "QCIntegration"; bug.Summary = "Short description of the bug"; bug.DetectedBy = "Aaron Evans"; bug.AssignedTo = "Nobody"; bug.Priority = "Low"; bug.Post(); }
public IEnumerable <BugModel> List(string version) { var bugs = new List <BugModel>(); var appDbEntity = _appRepository.Get(version); if (appDbEntity == null) { return(bugs); } foreach (var bugDbEntity in _bugRepository.List(appDbEntity.Id)) { bugDbEntity.App = appDbEntity; bugs.Add(BugFactory.Create(bugDbEntity)); } return(bugs); }
public static void InitIntro(AnimationService animationService, int introspeedincrease) { //introspeedincrease = -5; //two groups of four from top for (int i = 0; i < 4; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i, (i * Constants.BugIntroSpacing * 2) + 75, new Challenge1(), Sprite.SpriteTypes.MosquitoBug, 1, introspeedincrease, false)); } for (int i = 0; i < 4; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 4, i * Constants.BugIntroSpacing * 2, new Challenge2(), Sprite.SpriteTypes.MosquitoBug, 1, introspeedincrease, false)); } //two groups of four from bottom for (int i = 0; i < 4; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 8, i * Constants.BugIntroSpacing, new Challenge3(), Sprite.SpriteTypes.GreenBug, 2, introspeedincrease, false)); } for (int i = 0; i < 4; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 12, i * Constants.BugIntroSpacing, new Challenge4(), Sprite.SpriteTypes.MosquitoBug, 2, introspeedincrease, false)); } //two groups of four from bottom for (int i = 0; i < 4; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 16, i * Constants.BugIntroSpacing, new Challenge3(), Sprite.SpriteTypes.MosquitoBug, 3, introspeedincrease, false)); } for (int i = 0; i < 4; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 20, i * Constants.BugIntroSpacing, new Challenge4(), Sprite.SpriteTypes.MosquitoBug, 3, introspeedincrease, false)); } //two groups of eight from top for (int i = 0; i < 4; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 24, (i * Constants.BugIntroSpacing * 2) + 75, new Challenge1(), Sprite.SpriteTypes.MosquitoBug, 4, introspeedincrease, false)); } for (int i = 0; i < 4; i++) { animationService.Animatables.Add(BugFactory.CreateAnimatable_BugIntro(i + 28, i * Constants.BugIntroSpacing * 2, new Challenge2(), Sprite.SpriteTypes.MosquitoBug, 4, introspeedincrease, false)); } }
// Create New Defect in Defects Tab QC public static int CreateDefect(String Status, String Summary, String DetectedBy, String Version) { try { BugFactory bugFactory = mTDConn.BugFactory; //start of get bug mandatory fields Customization field = (Customization)mTDConn.Customization; CustomizationFields f = (CustomizationFields)field.Fields; List BugFieldsList = f.get_Fields("BUG"); Dictionary <string, string> MandatoryFields = new Dictionary <string, string>(); Dictionary <string, List <string> > MandatoryListSelections = new Dictionary <string, List <string> >(); foreach (CustomizationField BugField in BugFieldsList) { if (BugField.IsRequired) { List <string> FieldList = new List <string>(); if (BugField.List != null && BugField.List.RootNode.Children.Count > 0) { CustomizationListNode lnode = BugField.List.RootNode; List cNodes = lnode.Children; foreach (CustomizationListNode ccNode in cNodes) { //adds list of valid selections of Field FieldList.Add(ccNode.Name); } } if (!MandatoryFields.ContainsKey(BugField.UserLabel)) { MandatoryFields.Add(BugField.UserLabel, BugField.ColumnName); if (FieldList.Count > 0) { MandatoryListSelections.Add(BugField.UserLabel, FieldList); } else { MandatoryListSelections.Add(BugField.UserLabel, null); } } } } //end of get mandatory fileds /* * Bug bug = bugFactory.AddItem(System.DBNull.Value); * //start of populate mandatory field with first one from dropdown * foreach (dynamic item in MandatoryFields) * { * dynamic staticSelection = MandatoryListSelections.Where(M => M.Key == item.Key).Select(m => m.Value).FirstOrDefault(); * bug[item.Value] = staticSelection[0]; //statically selecting first item in list * } * //end of populate mandatory fields */ Bug bug = bugFactory.AddItem(System.DBNull.Value); bug.Status = Status; //bug.Project = "Internal"; bug.Summary = Summary; bug.DetectedBy = DetectedBy; bug["BG_USER_08"] = Version; //bug.AssignedTo = "Nobody"; //bug.Priority = "Low"; bug.Post(); return(bug.ID); } catch (Exception ex) { //String Text = "Defect Creation Failed."; Reporter.ToLog(eLogLevel.ERROR, $"Method - {MethodBase.GetCurrentMethod().Name}, Error - {ex.Message}", ex); return(0); } }
public Models.Bug Get(int id) { var entity = _bugRepository.Get(id); return(BugFactory.Create(entity)); }
static void Main(string[] args) { System.Console.WriteLine(BugFactory.GetLongDebugView(true)); System.Console.ReadLine(); }