public void WithSyncStatus_SyncStatus_ShouldBe_Value()
        {
            // Arrange
            var profile = new Profile {
                SyncStatus = ProfileSyncStatus.InProgress
            };
            const ProfileSyncStatus value = ProfileSyncStatus.Succeeded;

            // Act
            profile = profile.WithSyncStatus(value);
            // Assert
            profile.SyncStatus.Should().Be(value);
        }
Example #2
0
        public ProfileViewModel(Profile profile)
        {
            Id           = profile.Id;
            IsPredefined = profile.IsPredefined;
            Name         = profile.Name;
            Protocol     = profile.Protocol;
            Color        = profile.ColorCode;
            SecureCore   = profile.Features.IsSecureCore();
            Type         = profile.ProfileType;

            if (profile.Server != null)
            {
                ConnectionInfoViewModel = new ConnectionInfoViewModel(profile.Server);
            }

            _syncStatus       = profile.SyncStatus;
            _originSyncStatus = profile.SyncStatus;
        }
 public ProfileSyncStatusChangedEventArgs(ProfileSyncStatus status, string errorMessage, DateTime changesSyncedAt)
 {
     Status          = status;
     ErrorMessage    = errorMessage;
     ChangesSyncedAt = changesSyncedAt;
 }
Example #4
0
        public static Profile WithSyncStatus(this Profile profile, ProfileSyncStatus value)
        {
            profile.SyncStatus = value;

            return(profile);
        }