|
Wow, you wrote that like we are biding on your job, or we are a member of your programming staff.
So lets talk about this simple CRUD module ...
Simply write code to perform your unit testing of your CRUD operations!
Or write code to simulate multiple scenarios like real time use of the application.
Automatically generate test scenarios?
I think it would be faster to just write code, than to setup an automated test.
I can't see how an automated test would produce a test of durability, reliability and speed for a CRUD operation.
CRUD is so simple in design, and requires very few lines of code if planned correctly.
Unit Testing Tutorial: 6 Best Practices to Get Up To Speed
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Any test that has been automatically generated has no value at all.
|
|
|
|
|
A master plan for your commercial project, in other words. People pay for that information.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Hi All,
For one of the projects, we need to have the functionality to manage different versions of the documents. I am just wondering if there is an application with which we can integrate instead of re-inventing the wheel. Git like system would be ideal.
Thanks
|
|
|
|
|
Have you considered Git?
Adding a server isn't difficult: set up a git server - Google Search[^] or just create a GitHub / BitBucket / other repository and use that.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: Have you considered Git?
It's certainly "git-like" which ticks the only box in his requirements.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
OriginalGriff wrote: Have you considered Git?
Can git be integrated easily and will it work with all the file formats? For instance, the user will log in to our system, upload document, and then we can integrate with git to manage and keep track of all the versions of the document uploaded. User can anytime retrieve the old versions. This is a typical scenario we would like to achieve. How is Git performance-wise if the file uploaded is relatively big 500MB+?
Thank you.
|
|
|
|
|
cp-andy wrote: Can git be integrated easily
Apparently so: Operate Git with .NET Core - Edi Wang[^] (works with Framework and Core, but I haven't tried it myself)
cp-andy wrote: will it work with all the file formats?
Git is primarily text based, but it can track binary formats as well - just not with the fine resolution it uses for text changes. I'd suspect most "git-like" systems do much the same, as it'd be a PITA to track inserts and deletes in binary files (it's bad enough with text files!)
cp-andy wrote: How is Git performance-wise if the file uploaded is relatively big 500MB+?
No idea - I've never tried! They do mention a size limit, but I don't know what it is: Working with large files - GitHub Docs[^]. TBH, unless you are hosting your own service, I'd suspect there will be a file size limit with any system - storage is cheap these days, but that doesn't mean they will just give it away!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Amazon WorkDocs. It has a simple to use API.
|
|
|
|
|
SharePoint, Team Collaboration Software Tools
If I recall, unlimited "free visitors" and about $5 per month for a "user". PDF's, Doc's, Excel, etc. Versioning, approving. Web sites. Custom tables and views. REST. Can't remember anything that was missing.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
I want to Pad two fields like this, one is Id integer and other one is Number string, for example if Ids are as follows: 1189, 758, 756, I want to generate numbers as: T01189, T00758, T00756. Can somebody please suggest me how can I do it in C#? Thanks in advance.
|
|
|
|
|
string result = Number + Id.ToString("D5");
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
You're welcome!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
string x = string.Format("T{0}", number.ToString("00000"));
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Even simpler:
string x = string.Format("T{0:D5}", number); Or:
string x = $"T{number:D5}";
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
isn't the "$" notation for PHP or some other stupid language? Or is it a new pointless operator in C#?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
|
Let's obfuscate C# even more than it already is...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
String interpolation was a pretty good addition, IMO. Especially when you compare it to the abomination that became of default interface methods[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I agree - I use string interpolation precisely because it de-obfuscates code:
Console.WriteLine("({2},{1}):({0},{3})={4}", destX, y, x, destY, dist); Isn't as obvious as
Console.WriteLine($"({x},{y}):({destX},{destY})={dist}");
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: precisely because it de-obfuscates code: Except when you use random ordering of your variables. 
|
|
|
|
|
I've seen code like that before: when the variable list order is wrong, and it was easier to renumber than juggle the names ... Not that I'd write code like that, oh no.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
For me, the numbers have to be in order, so I juggle the names.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
A legitimate use case for unordered variables might be when writing output in different languages. In one language you might want to write "Page 1 of 10", but in another it might be "10 pages, No. 1" or some such. You would read the template from the resource file, filling in the values as necessary.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|