public void AddWaggon_AddWaggonWithSameIdentifierTwice_InvalidOperationException()
 {
     ConfigBuilder configuration = new ConfigBuilder();
     Waggon waggonOne = CreateFakeWaggon("1234");
     Waggon waggonTwo = CreateFakeWaggon("1234");
     configuration.AddWaggon(waggonOne);
     configuration.AddWaggon(waggonTwo);
 }
 public void AddWaggon_AddNewWaggonToEmptyConfiguration_WaggonDoesExistInWaggonList()
 {
     string waggonIdentifier = "111111-222222-3";
     ConfigBuilder configuration = new ConfigBuilder();
     Waggon waggon = CreateFakeWaggon(waggonIdentifier);
     configuration.AddWaggon(waggon);
     int waggonCount = configuration.Waggons.Count;
     Assert.IsTrue(waggonCount == 1);
 }
 public void AddWaggon_AddNull_ArgumentNullException()
 {
     ConfigBuilder configuration = new ConfigBuilder();
     configuration.AddWaggon(null);
 }
 private ConfigBuilder CreateFakeConfigBuilderWithSomeValues()
 {
     ConfigBuilder configBuilder = new ConfigBuilder();
     configBuilder.AddWaggon(CreateFakeWaggon("111111-11111-1"));
     configBuilder.AddWaggon(CreateFakeWaggon("222222-22222-2"));
     configBuilder.AddWaggon(CreateFakeWaggon("333333-33333-3"));
     configBuilder.AddSetting(new Setting("Key1", "Value1"));
     configBuilder.AddSetting(new Setting("Key2", "Value2"));
     configBuilder.AddSetting(new Setting("Key3", "Value3"));
     configBuilder.AddIPAddress(new PartOfIPAddress("1", "x.x.x.1"));
     configBuilder.AddIPAddress(new PartOfIPAddress("2", "x.x.x.2"));
     configBuilder.AddIPAddress(new PartOfIPAddress("3", "x.x.x.3"));
     return configBuilder;
 }