Posts by accelerate • 53 points
6 posts
-
0
votes0
answers23
viewsQ: Ignore class attributes using Datamember C#
I’m trying to return a json from a controller by ignoring some of the fields in it. Controller: [HttpGet] public IActionResult Get() { var result = _service.Generate(); if (result == null)…
-
1
votes1
answer644
viewsQ: Unit Service Testing Using Karma (typescript/angular)
I’m trying to test a service GET method: get(url: string, params?: any): Observable<Response> { let options = {}; this.securityService.setHeaders(options); if (params) this.setParams(options,…
-
0
votes1
answer270
viewsQ: Unit Karma Test for Typescript/Angular Method
I’m having trouble testing a method of select, that’s the method: select(task): any { (document.getElementById(task) as HTMLInputElement).select(); }; It is called by html, in this part here:…
-
0
votes1
answer312
viewsQ: Karma unit tests (typescript/angular)
I am trying to perform a unit test for a method made in typescript, this is the method: createTasksForms(): void { this.task.forEach(task => { task.form = this.form.group({ name: ['',…
-
-1
votes1
answer144
viewsQ: Private unit attribute test of a class / C#
I’m trying to create a unit test to ensure that an attribute of an X class is actually changed. But to compare it at the end of my test, something like: Assert.Equal(_sampleClass.Email, mockEmail);…
-
3
votes3
answers1436
viewsQ: SQL - Two different WHERE conditions for the same SELECT
I am developing an SQL query which has two different WHERE functions according to the return of a variable. I tried some alternatives but none seem to fit, I need something with this logic: IF…