public void All_Values_Are_Copied_To_Tenant(TenantDTO dto, byte[] versionBytes) { //Version needs to be a valid base 64 string dto.Version = Convert.ToBase64String(versionBytes); Tenant tenant = dto.ToTenant(); AssertAdditions.AllPropertiesAreEqual(tenant, dto, nameof(tenant.ConcurrencyToken), nameof(tenant.CreatedTime)); }
public void Version_Is_Transferred_Correctly(TenantDTO dto, byte[] versionBytes) { //Version needs to be a valid base 64 string dto.Version = Convert.ToBase64String(versionBytes); Tenant tenant = dto.ToTenant(); Assert.Equal(versionBytes, tenant.ConcurrencyToken); }
public void Round_Trip_Concurrency_Token(Tenant tenant) { TenantDTO dto = new TenantDTO(tenant); Tenant converted = dto.ToTenant(); Assert.NotSame(tenant, converted); Assert.NotSame(tenant.ConcurrencyToken, converted.ConcurrencyToken); Assert.Equal(tenant.ConcurrencyToken, converted.ConcurrencyToken); }