Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using TripAdministrations;
- using NUnit.Framework;
- class Test_14
- {
- private TripAdministrator tripAdministrations;
- private Company c1 = new Company("a", 2);
- private Company c2 = new Company("b", 1);
- private Company c3 = new Company("c", 1);
- private Company c4 = new Company("d", 2);
- private Trip t1 = new Trip("a", 1, Transportation.NONE, 1);
- private Trip t2 = new Trip("b", 1, Transportation.BUS, 1);
- private Trip t3 = new Trip("c", 1, Transportation.BUS, 1);
- private Trip t4 = new Trip("d", 1, Transportation.BUS, 1);
- [SetUp]
- public void Setup()
- {
- this.tripAdministrations = new TripAdministrator();
- }
- [Test]
- public void TestRemoveCompany()
- {
- this.tripAdministrations.AddCompany(c1);
- this.tripAdministrations.AddTrip(c1, t1);
- Assert.True(this.tripAdministrations.Exist(c1));
- this.tripAdministrations.RemoveCompany(c1);
- Assert.False(this.tripAdministrations.Exist(c1));
- Assert.False(this.tripAdministrations.Exist(t1));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement