public async Task AddDriverLicenceAsync(long organisationGroupId, DriverLicence driverLicence) { IHttpRestRequest request = GetRequest(APIControllerRoutes.DriverLicenceController.ADDDRIVERLICENCE, HttpMethod.Post); request.AddUrlSegment("organisationId", organisationGroupId.ToString()); request.AddJsonBody(driverLicence); await ExecuteAsync(request).ConfigureAwait(false); }
public void EqualsObjectCastTest() { string number = "test-number"; DriverLicence driverLicence = new DriverLicence(number: number); object obj = new DriverLicence(number: number); Assert.True(driverLicence.Equals(obj)); }
public void AddDriverLicence(long organisationGroupId, DriverLicence driverLicence) { IHttpRestRequest request = GetRequest(APIControllerRoutes.DriverLicenceController.ADDDRIVERLICENCE, HttpMethod.Post); request.AddUrlSegment("organisationId", organisationGroupId.ToString()); request.AddJsonBody(driverLicence); Execute(request); }
public void DriverLicenceTest() { DriverLicence driverLicence = new DriverLicence(number: "test-number"); dataFields.DriverLicence = driverLicence; Assert.Equal(driverLicence, dataFields.DriverLicence); Assert.Equal(driverLicence, (new DataFields(driverLicence: driverLicence)).DriverLicence); }
public void EqualsTest() { string number = "test-number"; DriverLicence number1 = new DriverLicence(number: number); Assert.Equal(number1, number1); Assert.Equal(number1, new DriverLicence(number: number)); Assert.NotEqual(number1, new DriverLicence(number: number + "1")); Assert.False(number1.Equals(null)); }
public void GetHashcodeTest() { DriverLicence driverLicence1 = new DriverLicence(); driverLicence1.Number = "test-number"; driverLicence1.State = "test-state"; driverLicence1.DayOfExpiry = 15; driverLicence1.MonthOfExpiry = 3; driverLicence1.YearOfExpiry = 2025; DriverLicence driverLicence2 = new DriverLicence(); driverLicence2.Number = "test-number"; driverLicence2.State = "test-state"; driverLicence2.DayOfExpiry = 15; driverLicence2.MonthOfExpiry = 3; driverLicence2.YearOfExpiry = 2025; Assert.Equal(driverLicence1.GetHashCode(), driverLicence2.GetHashCode()); }
/// <summary> /// Initializes a new instance of the <see cref="TestEntityDataFields" /> class. /// </summary> /// <param name="testEntityName">Friendly name for the test entity.</param> /// <param name="personInfo">personInfo.</param> /// <param name="location">location.</param> /// <param name="communication">communication.</param> /// <param name="driverLicence">driverLicence.</param> /// <param name="nationalIds">National Identification Information.</param> /// <param name="passport">passport.</param> /// <param name="document">document.</param> /// <param name="business">business.</param> /// <param name="countrySpecific">CountrySpecific fields {\"CountryCode\" : {\"Field1\" : \"Value\", \"Field2\" : \"Value\" }}.</param> public TestEntityDataFields(string testEntityName = default(string), PersonInfo personInfo = default(PersonInfo), Location location = default(Location), Communication communication = default(Communication), DriverLicence driverLicence = default(DriverLicence), List <NationalId> nationalIds = default(List <NationalId>), Passport passport = default(Passport), Document document = default(Document), Business business = default(Business), Dictionary <string, Dictionary <string, string> > countrySpecific = default(Dictionary <string, Dictionary <string, string> >)) { this.TestEntityName = testEntityName; this.PersonInfo = personInfo; this.Location = location; this.Communication = communication; this.DriverLicence = driverLicence; this.NationalIds = nationalIds; this.Passport = passport; this.Document = document; this.Business = business; this.CountrySpecific = countrySpecific; }
public DriverLicenceTests() { driverLicence = new DriverLicence(); }