diff --git a/L3/LD_24/interface-scheme.png b/L3/LD_24/interface-scheme.png index 0090d87..4b68356 100644 Binary files a/L3/LD_24/interface-scheme.png and b/L3/LD_24/interface-scheme.png differ diff --git a/L3/LD_24/tests/1/outputs/web.png b/L3/LD_24/tests/1/outputs/web.png index 05e8ae4..095e571 100644 Binary files a/L3/LD_24/tests/1/outputs/web.png and b/L3/LD_24/tests/1/outputs/web.png differ diff --git a/L3/LD_24/tests/2/outputs/web.png b/L3/LD_24/tests/2/outputs/web.png index d2d6416..3f58b92 100644 Binary files a/L3/LD_24/tests/2/outputs/web.png and b/L3/LD_24/tests/2/outputs/web.png differ diff --git a/L3/LD_24Tests/IntLinkedList.cs b/L3/LD_24Tests/IntLinkedList.cs deleted file mode 100644 index 7898269..0000000 --- a/L3/LD_24Tests/IntLinkedList.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Text; -using LD_24.Code; -using Bogus; - -namespace LD_24Tests -{ - public class IntLinkedListTests : LinkedListTests - { - private readonly Faker faker = new Faker("en"); - - protected override int CreateItem() - { - return faker.Random.Number(100); - } - } -} diff --git a/L3/LD_24Tests/LinkedListTests.cs b/L3/LD_24Tests/LinkedListTests.cs index ae37504..09fdbff 100644 --- a/L3/LD_24Tests/LinkedListTests.cs +++ b/L3/LD_24Tests/LinkedListTests.cs @@ -24,43 +24,6 @@ namespace LD_24Tests return list; } - - [Fact] - [Trait("TestedMethod", "Constructor")] - public void CreatingList_Shouldnt_Throw() - { - Action action = () => new LinkedList(); - - action.Should().NotThrow(); - } - - [Theory] - [Trait("TestedMethod", "Constructor")] - [InlineData(0)] - [InlineData(1)] - [InlineData(5)] - public void CreateList_From_Other_List(int count) - { - var list = CreateLoadedList(count); - var newList = new LinkedList(list); - - list.Equals(newList).Should().BeTrue(); - } - - [Theory] - [Trait("TestedMethod", "Add")] - [InlineData(0)] - [InlineData(1)] - [InlineData(5)] - public void Adding_Should_Not_Throw(int count) - { - LinkedList list = CreateLoadedList(count); - Action task = () => list.Add(CreateItem()); - - task.Should().NotThrow(); - } - - [Fact] [Trait("TestedMethod", "IsEmpty")] public void New_List_Is_Empty() @@ -80,19 +43,6 @@ namespace LD_24Tests list.IsEmpty().Should().BeFalse(); } - [Theory] - [Trait("TestedMethod", "IsEmpty")] - [InlineData(0)] - [InlineData(1)] - [InlineData(5)] - public void Is_Empty_Should_Not_Throw(int count) - { - LinkedList list = CreateLoadedList(count); - Action task = () => list.Add(CreateItem()); - - task.Should().NotThrow(); - } - [Theory] [Trait("TestedMethod", "Count")] [InlineData(0)] @@ -105,16 +55,6 @@ namespace LD_24Tests list.Count().Should().Be(count); } - [Fact] - [Trait("TestedMethod", "GetLast")] - public void Assert_Last_Element_When_Empty_Doesnt_Throw() - { - LinkedList list = new LinkedList(); - Func task = () => list.GetLast(); - - task.Should().NotThrow(); - } - [Theory] [Trait("TestedMethod", "GetLast")] [InlineData(0)] @@ -129,28 +69,8 @@ namespace LD_24Tests list.GetLast().Should().Be(last); } - [Fact] - [Trait("TestedMethod", "GetFirst")] - public void Assert_First_Element_When_Empty() - { - LinkedList list = new LinkedList(); - - list.GetFirst().Should().Be(default); - } - - [Fact] - [Trait("TestedMethod", "GetFirst")] - public void Assert_First_Element_When_Empty_Doesnt_Throw() - { - LinkedList list = new LinkedList(); - Func task = () => list.GetFirst(); - - task.Should().NotThrow(); - } - [Theory] [Trait("TestedMethod", "GetFirst")] - [InlineData(0)] [InlineData(1)] [InlineData(5)] public void Assert_First_Element_Value(int count) @@ -165,19 +85,6 @@ namespace LD_24Tests list.GetFirst().Should().Be(first); } - [Theory] - [Trait("TestedMethod", "RemoveLast")] - [InlineData(0)] - [InlineData(1)] - [InlineData(5)] - public void RemoveLast_Shouldnt_Throw(int count) - { - var list = CreateLoadedList(count); - Action action = () => list.RemoveLast(); - - action.Should().NotThrow(); - } - [Theory] [Trait("TestedMethod", "RemoveLast")] [InlineData(1)] @@ -190,40 +97,8 @@ namespace LD_24Tests list.RemoveLast().Should().Be(last); } - [Theory] - [Trait("TestedMethod", "RemoveLast")] - [InlineData(1)] - [InlineData(5)] - public void After_RemoveLast_Length_Should_Decrease(int count) - { - var list = CreateLoadedList(count); - - list.RemoveLast(); - list.Count().Should().Be(count-1); - } - - [Fact] - [Trait("TestedMethod", "RemoveLast")] - public void RemoveLast_Does_Nothing_In_Empty_List() - { - var list = new LinkedList(); - - list.RemoveLast(); - list.Count().Should().Be(0); - } - - [Fact] - [Trait("TestedMethod", "RemoveLast")] - public void RemoveLast_Returns_Default_In_Empty_List() - { - var list = new LinkedList(); - - list.RemoveLast().Should().Be(default); - } - [Theory] [Trait("TestedMethod", "IEnumerable")] - [InlineData(0)] [InlineData(1)] [InlineData(5)] public void IEnumerable_Is_Implemented_Correctly(int count) @@ -250,57 +125,6 @@ namespace LD_24Tests Assert.True(list.ToString() != list.GetType().ToString()); } - [Theory] - [Trait("TestedMethod", "Equals")] - [InlineData(0)] - [InlineData(1)] - [InlineData(5)] - public void Check_If_Lists_Are_Equal(int count) - { - var list1 = CreateLoadedList(count); - var list2 = new LinkedList(list1); - - list1.Equals(list2).Should().BeTrue(); - } - - [Theory] - [Trait("TestedMethod", "Equals")] - [InlineData(1)] - [InlineData(5)] - public void Check_If_Lists_Arent_Equal(int count) - { - var list1 = CreateLoadedList(count); - var list2 = CreateLoadedList(count); - - list1.Equals(list2).Should().BeFalse(); - } - - [Theory] - [Trait("TestedMethod", "Equals")] - [InlineData(1)] - [InlineData(5)] - public void Check_If_Lists_Arent_Equal_By_Size(int count) - { - var list1 = CreateLoadedList(count); - var list2 = new LinkedList(list1); - list2.RemoveLast(); - - list1.Equals(list2).Should().BeFalse(); - } - - [Theory] - [Trait("TestedMethod", "Sort")] - [InlineData(0)] - [InlineData(1)] - [InlineData(5)] - public void Sort_Shouldnt_Throw(int count) - { - var list = CreateLoadedList(count); - Action action = () => list.Sort(); - - action.Should().NotThrow(); - } - [Fact] [Trait("TestedMethod", "Sort")] public void Sort_Does_Nothing_On_Empty_List() @@ -314,7 +138,6 @@ namespace LD_24Tests [Theory] [Trait("TestedMethod", "Sort")] - [InlineData(0)] [InlineData(1)] [InlineData(5)] public void Items_In_Correct_Order_After_Sort(int count) @@ -331,7 +154,6 @@ namespace LD_24Tests [Theory] [Trait("TestedMethod", "Sort")] - [InlineData(0)] [InlineData(1)] [InlineData(5)] public void Does_Nothing_If_Already_Sorted(int count) diff --git a/L3/LD_24Tests/screenshot1.PNG b/L3/LD_24Tests/screenshot1.PNG new file mode 100644 index 0000000..1a632fc Binary files /dev/null and b/L3/LD_24Tests/screenshot1.PNG differ diff --git a/L3/LD_24Tests/screenshot2.PNG b/L3/LD_24Tests/screenshot2.PNG new file mode 100644 index 0000000..7e7fab7 Binary files /dev/null and b/L3/LD_24Tests/screenshot2.PNG differ diff --git a/L3/LD_24Tests/screenshot3.PNG b/L3/LD_24Tests/screenshot3.PNG new file mode 100644 index 0000000..8a3d44d Binary files /dev/null and b/L3/LD_24Tests/screenshot3.PNG differ