Do Every Code in C# language please!! Using TDD, implement the tests and implementation for the Container class. Fun

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Do Every Code in C# language please!! Using TDD, implement the tests and implementation for the Container class. Fun

Post by answerhappygod »

Do Every Code in C# language please!!
Using TDD, implement the tests and implementation for the
Container<TE> class.
FunctionalTesting.xlsx:
Do Every Code In C Language Please Using Tdd Implement The Tests And Implementation For The Container Te Class Fun 1
Do Every Code In C Language Please Using Tdd Implement The Tests And Implementation For The Container Te Class Fun 1 (124.1 KiB) Viewed 31 times
Container.cs:
Do Every Code In C Language Please Using Tdd Implement The Tests And Implementation For The Container Te Class Fun 2
Do Every Code In C Language Please Using Tdd Implement The Tests And Implementation For The Container Te Class Fun 2 (55.91 KiB) Viewed 31 times
IContainer.cs:
Do Every Code In C Language Please Using Tdd Implement The Tests And Implementation For The Container Te Class Fun 3
Do Every Code In C Language Please Using Tdd Implement The Tests And Implementation For The Container Te Class Fun 3 (25.41 KiB) Viewed 31 times
ContainerTests.cs:
Do Every Code In C Language Please Using Tdd Implement The Tests And Implementation For The Container Te Class Fun 4
Do Every Code In C Language Please Using Tdd Implement The Tests And Implementation For The Container Te Class Fun 4 (79.95 KiB) Viewed 31 times
METHOD INPUT EXPECTED OUTPUT/BEHAVIOR Insert(E e) NULL Any E Non-type E Any E Any E E is "too big" Any E Any E Non-type E CONTAINER STATE Container exists with O elements FULL Non-empty, non-full Container is type E Container is not full Container is not full Container contains E Container is empty Container set of E Container is FULL Container is not full Container is not empty ERROR! ERROR! ERROR! E in container E in container ERROR! Exists(E e) TRUE FALSE FALSE FALSE FALSE Any E NULL NULL Delete(E e) ERROR! Any E Any E Any E Container is not empty, E exists Deletes E Container has duplicates, duplicate E value exists Deletes all instances of E Container is empty ERROR! Container is not empty, container does not contain E ERROR! Container is empty ERROR! Any E NULL
1 namespace Container.Lib; ~ 2 3 4 5 6 public class Container<TE> : IContainer<TE> { public void Insert(TE e) { throw new NotImplementedException(); } vo 7 8 0 0 9 10 11 public bool Exists (TE e) { throw new NotImplementedException(); } 12 13 14 15 16 public void Delete(TE e) { throw new Not ImplementedException(); } 17 18 19 }
1 2 3 4 0 000 W NP 5 6 namespace Container.Lib { public interface IContainer in TE> { void Insert(TE e); bool Exists (TE e); void Delete(TE e); } } 7 8 9
1 using Container.Lib; using Nunit.Framework; 2 3 4 Nm non 5 6 7 namespace Container. Tests { public class ContainerTests { [Setup] public void setup() { 8 9 10 11 12 } 13 14 15 16 [Test] public void TestExistsShouldReturnTrueForFive() { // Arrange var container = new Container int>(); container. Insert(5); 17 18 19 20 21 // Act var exists = container. Exists(5); 22 23 24 25 // Assert Assert. IsTrue(exists); 26 } 27 } 28 }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply