public async Task TestGetUserAsync()
        {
            var photoService    = ServiceMocks.GetStandardMockPhotoService();
            var locationService = ServiceMocks.GetStandardMockLocationService();
            var nameRepository  = new Mock <IRepository <DisplayName> >();
            var cacheService    = ServiceMocks.GetStandardMockCacheService();
            var userService     = new UserService(_mockUserRepository.Object, nameRepository.Object, photoService.Object, locationService.Object, cacheService.Object);
            var user            = await userService.GetUserAsync(1, FakeUsers.GetPublic().AsModel());

            user.Should().NotBeNull("it exists");
            user.DateCreated.Should().BeBefore(DateTime.UtcNow);
            user.FirstName.Should().Be("Daria");
            user.Location.StateOrProvince.Should().Be("GA");
            user.ProfileVisibility.Should().Be(Visibility.Public);
            user.ActivityVisibility.Should().Be(Visibility.Public);
            user.OriginVisibility.Should().Be(Visibility.Public);
            user.PlantInfoVisibility.Should().Be(Visibility.Public);
            user.InventoryItemVisibility.Should().Be(Visibility.Public);
        }
Beispiel #2
0
 public OriginServiceTests()
 {
     _mockOriginRepository = RepositoryMocks.GetStandardMockOriginRepository();
     _mockLocationService  = ServiceMocks.GetStandardMockLocationService();
 }