-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f22dcaa
commit e760b93
Showing
68 changed files
with
3,501 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Application.Interfaces; | ||
using Application.Resources.Shared; | ||
using Common; | ||
|
||
namespace Application.Services.Shared; | ||
|
||
public interface IUserProfilesService | ||
{ | ||
Task<Result<UserProfile, Error>> CreateMachineProfilePrivateAsync(ICallerContext caller, string machineId, | ||
string name, | ||
string? timezone, string? countryCode, CancellationToken cancellationToken); | ||
|
||
Task<Result<UserProfile, Error>> CreatePersonProfilePrivateAsync(ICallerContext caller, string personId, | ||
string emailAddress, | ||
string firstName, string? lastName, string? timezone, string? countryCode, CancellationToken cancellationToken); | ||
|
||
Task<Result<Optional<UserProfile>, Error>> FindPersonByEmailAddressPrivateAsync(ICallerContext caller, | ||
string emailAddress, CancellationToken cancellationToken); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Common; | ||
using FluentAssertions; | ||
using UnitTesting.Common; | ||
using Xunit; | ||
|
||
namespace Domain.Shared.UnitTests; | ||
|
||
[Trait("Category", "Unit")] | ||
public class PhoneNumberSpec | ||
{ | ||
[Fact] | ||
public void WhenConstructWithInvalidNumber_ThenReturnsError() | ||
{ | ||
var result = PhoneNumber.Create("aninvalidnumber"); | ||
|
||
result.Should().BeError(ErrorCode.Validation, Resources.PhoneNumber_InvalidPhoneNumber); | ||
} | ||
|
||
[Fact] | ||
public void WhenConstructWithNationalNumber_ThenReturnsError() | ||
{ | ||
var result = PhoneNumber.Create("098876986"); | ||
|
||
result.Should().BeError(ErrorCode.Validation, Resources.PhoneNumber_InvalidPhoneNumber); | ||
} | ||
|
||
[Fact] | ||
public void WhenConstructWithInternationalNumber_ThenReturnsNumber() | ||
{ | ||
var result = PhoneNumber.Create("+6498876986"); | ||
|
||
result.Should().BeSuccess(); | ||
result.Value.Number.Should().Be("+6498876986"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.