Hi Last time I shown you what is AutoCodeCoverage. Today I would like to show you how it can help you. I'll show you how it can find small mistakes in you code. Let's start. Last time i shown my example solution which was covered in 100% by unit tests with AutoCodeCoverage. There were 3 projects - SimpleClassLibrary, SimpleClassLibrary2 and UnitTestProject1. It looked like: Now it looks like: I added more empty implementations of interface Inter1Lib2 and change logic of Class2. Old Class2 was looking like this: namespace SimpleClassLibrary { public class Class2 { public void HowIWasCreated(Class1 cl) { if (cl == null) { Console.WriteLine("null"); return; } if (cl.HowCreated() == EnumHowCreated.DefaultConstructor) { Console.WriteLine("Default"); } if (cl.HowCreated() == EnumHowCreated.ParameterConstructor) { Console.WriteLine("Paramet...
Hi I was wondering for some time about code coverage in c#. I'm using a lot of DTO objects which should be covered by unit tests. I thought that it should be covered by default. I wrote simple project FakeCodeCoverage. It used reflection to cover the simplest way in constructors and methods. It was not enough for me. It was really only fake coverage. I abandoned this project but I started new project AutoCodeCoverage. This is different from the previous one because it tries cover all statements, branches and conditions. As result you can get all exceptions which was thrown while invoking methods, constructors, properties, etc. It allows to inject implementation of interface or instance of type which will be used at all times when this type will be exist as parameter. In DTOs or simple projects AutoCodeCoverage could cover up to 100% lines of your code. It is published on nuget https://www.nuget.org/packages/AutoCodeCoverage Actually it support .net4.x, .netcore...
Cześć, Ostatni temat na dzisiaj to wzmacniacze smaku. Są to produkty, powodujące, że odczuwany smak danego produktu jest wzmocniony. Większość z nich uzależnia i powoduje, że jedzenie bez wzmacniacza smaku jest niesmaczne. Dodatkowo wzmacniacze smaku mogą powodować bóle głowy reakcje alergiczne oraz zawroty głowy. Aksam Beskidzkie Paluszki o smaku ser cebulka 220 g mąka pszenna, preparat serowo-cebulowy [warzywa suszone (cebula - 1,9%, por), sól, drożdże autolizowane, cukier, maltodekstryna, ekstrakt drożdżowy (zawiera gluten), wzmacniacz smaku: glutaminian monosodowy, olej roślinny słonecznikowy, ser w proszku (z mleka) (0,1%), regulator kwasowości: kwas cytrynowy, serwatka (z mleka), ekstrakt przyprawy], olej roślinny rzepakowy, sól, cukier, regulator kwasowości: wodorotlenek sodu, substancje spulchniające: węglany sodu, węglany amonu
Komentarze
Prześlij komentarz