The goal of this assignment is designed to help me familiarized with the fundementals of XUnit testing in an object-oriented implmentation.
Packages used within .NET Core:
- Microsoft.NET.Test.Sdk
- xunit
$ git clone https://github.com/jia-von/xunit-practice-cummulative.git
$ cd xunit-practice-cumulative-jia-von
$ cd XUnitCumulativePractice
$ start devenv XUnitCumulativePractice.sln
-
A solution and console application was created with a name
XUnitCumulativePractice.sln
. -
A new XUnit Test project (.NET Core) was created with solution name
XUnitCumulativePractice_Tests.sln
. -
A program written named
ValidateOneToOneHundredEven()
method.- This method that will accept a string ("1" or "20" etc.) as a parameter.
- Test casses was created to test tis method and to validate string as integers.
-
Two classes was created,
Item.cs
andStorage.cs
.Item.cs
have a string property.Storage.cs
have list properties and methods,AddItem()
andRemoveItem()
.
-
Several tests were written for:
- Addition of created Item to a list in Storage.
- Removal of items from Storage.