public void WhenInstanceNamesDiffer_ThenOverlayByThrowsArgumentException() { var baseSettings = new VmInstanceConnectionSettings( "instance-1", null, null, null, RdpConnectionBarState._Default, RdpDesktopSize._Default, RdpAuthenticationLevel._Default, RdpColorDepth._Default, RdpAudioMode._Default, RdpRedirectClipboard._Default, RdpCredentialGenerationBehavior._Default); var overlay = new VmInstanceConnectionSettings( "instance-2", null, null, null, RdpConnectionBarState._Default, RdpDesktopSize._Default, RdpAuthenticationLevel._Default, RdpColorDepth._Default, RdpAudioMode._Default, RdpRedirectClipboard._Default, RdpCredentialGenerationBehavior._Default); Assert.Throws <ArgumentException>(() => baseSettings.OverlayBy(overlay)); }
public void WhenOverlayUsesNonDefaults_ThenOverlaySettingsPrevail() { var baseSettings = new VmInstanceConnectionSettings( "instance-1", null, null, null, RdpConnectionBarState._Default, RdpDesktopSize._Default, RdpAuthenticationLevel._Default, RdpColorDepth._Default, RdpAudioMode._Default, RdpRedirectClipboard._Default, RdpCredentialGenerationBehavior._Default); var overlay = new VmInstanceConnectionSettings( "instance-1", "user", null, "domain", RdpConnectionBarState.Off, RdpDesktopSize.ScreenSize, RdpAuthenticationLevel.RequireServerAuthentication, RdpColorDepth.DeepColor, RdpAudioMode.PlayOnServer, RdpRedirectClipboard.Disabled, RdpCredentialGenerationBehavior.Force); AssertEx.ArePropertiesEqual(overlay, baseSettings.OverlayBy(overlay)); }