Advertisement
IvetValcheva

Untitled

Dec 7th, 2022
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. using BarberShop;
  2. using NUnit.Framework;
  3. using System.Linq;
  4.  
  5. public class Test_19
  6. {
  7.     private BarberShop.BarberShop barberShop;
  8.     private Barber b1 = new Barber("a", 1, 1);
  9.     private Barber b2 = new Barber("b", 2, 3);
  10.     private Barber b3 = new Barber("c", 2, 2);
  11.  
  12.     private Client c1 = new Client("a", 1, Gender.MALE);
  13.     private Client c2 = new Client("b", 1, Gender.FEMALE);
  14.     private Client c3 = new Client("c", 2, Gender.FEMALE);
  15.     private Client c4 = new Client("d", 6, Gender.FEMALE);
  16.     private Client c5 = new Client("e", 5, Gender.FEMALE);
  17.  
  18.     [SetUp]
  19.     public void Setup()
  20.     {
  21.         this.barberShop = new BarberShop.BarberShop();
  22.     }
  23.  
  24.     [Test]
  25.     public void TestAssignClient()
  26.     {
  27.         this.barberShop.AddBarber(b1);
  28.         this.barberShop.AddClient(c1);
  29.         this.barberShop.AssignClient(b1, c1);
  30.  
  31.         Assert.True(this.barberShop.GetClientsWithNoBarber().Count() == 0);
  32.     }
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement