Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement and write tests for GeneralSkillsRepo #24

Merged
merged 7 commits into from
Apr 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.earth.testomania.tests.general

class GeneralSkillsMathematicalRepo {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to have some interface for repo and it's implementation

Copy link
Collaborator Author

@shalva97 shalva97 Mar 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know most of the books/blogspots say that, including you, but I disagree... So many interfaces and so many implementations I have seen and almost none used the benefits of having an interface. 99% of those did not had more than one implementation.

Actually, I want to deliberately make a mistake and do it without interfaces. It will be interesting to see how bad is this tight coupling thing.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want to create mistakes on our project? :D can you do it in another project? :D
well I agree with @kartlos99 we want to use best practices and implementation of repo is best practice, I know sometimes it seems we are adding a level of complexity and it may never change and be needed, but and I mean BIG BUT what if change will be nececery and interface will not be there? we will be disappointed :( so I also recomd to use best practices and thus use interface and implementation of the interface

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

| sometimes it seems we are adding a level of complexity

ჩემთვის ძალიან ხშირად ასე ჩანს.... რეალურად გვინდა რო მივყვეთ მაგ ბესთ ფრაქთისს? მე ვერ ვხედავ საჭიროებას.

| we will be disappointed

ესეც საკითხავია, მაინც რამდენად იმედგაცრუებული ვიქნებით? ინტელიჯეის უკვე აქვს ძალიან კარგი რეფაქტორის ფუნქციები, თუ მართლა გახდა საჭირო 2 წუთში შეილება დაემატოს ინტერფეისი...

Copy link
Owner

@Nodrex Nodrex Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

რადგან ჩვენი პროექტის ერთერთი მთავარი მიზანია განვითარება და სიახლეების სწავლა, შესაბამისად მისაღებია შენი გადაწყვეტილება, ანუ ნეიტალურს დავიჭერ მე, თუმცა ალბათ სხვების აზრიც უნდა მოვისმინოთ:
@nmgalo @mlkway თქვენ რას ფიქრობთ, დავტოვოთ ასე ინტერფეისის გარეშე?

მაგრამ ჩვენ ხომ შევთახმდით რომ სხვადასხვა ტესტი, თავთავის პაკეტში იქნებოდა, და როგორც მახსოვს უნარების ტესტებს სახელი skills შურჩიეთ, თუ გინდა skills_test დავარქვათ პაკეტს, მხოლოდ tests არა ინფორმატიული და ძაან ჯენერიკია
InkedScreenshot 2022-03-31 112835_LI

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ჩემიაზრით ჯობია სწორ პრაქტიკას მივყვეთ, Clean code ში ეწერა ეგ LeBlanc’s law: Later equals never.
ასერომ არჯობია თავიდანვე გვქონდეს სწორი მიდგომა?

Copy link
Owner

@Nodrex Nodrex Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean code ში ეწერა ეგ LeBlanc’s law: Later equals never
2019 წელს დავაყენე კამერა და ავაწყვე სერვერი windows ზე ვიდეოჩანაწერებეისვის, რათქმაუნდა იმავე წელს გადავწყვიტე რომ linux ზე გადავიყვანდი სერვერს და გაგიკვირდებათ 2022 წელია მაგრამ სერვერი ისევ windows ზეა :D რადგან მუშაობს, მეზარება linux ზე გადაყვანა :D
აგერ ჩემი შპიონი google photo დამემოწმება 2019 შია გადაღებული ფოტო :D
Inked277294242_394637039144992_485374272907831425_n_LI

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nodrex NixOS დააყენე, ძაან მაგარი რაღაცაა

fun getAllTests(): List<String> {
TODO()
}

fun getRandomTests(count: Int): List<String> {
TODO()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.earth.testomania.tests.general.dto

data class GeneralTestItemDTO(
// val active: Int,
// val creator_id: Any,
// val description: Any,
// val grade: Any,
val id: Int,
val options: List<OptionDTO>,
val ordering: Int,
val question: String,
// val subject_id: Any,
val test_id: Int,
// val text_id: Any,
// val type_id: Int
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.earth.testomania.tests.general.dto

data class OptionDTO(
val correct: Int,
val id: Int,
val option: String,
val question_id: Int,
// val timeline: Any // what is this
)
Loading