public void ExportPathByContractName_ReturnsExpectedValue(string contractName, string expectedEnding) { using var scope = new AssertIgnoreScope(); var exportedValue = GetExportedString(contractName); exportedValue.Should().EndWith(expectedEnding); Path.IsPathRooted(exportedValue).Should().BeTrue(); }
public void ConnectionInformationDialog_CreateConnectionInformation_InvalidModel_ReturnsNull() { // Setup ConnectionInfoDialogViewModel viewModel = ConnectionInformationDialog.CreateViewModel(null); Assert.IsFalse(viewModel.IsValid, "Empty view model should be invalid"); var emptyPassword = new SecureString(); // Act ConnectionInformation connInfo; using (var assertIgnoreScope = new AssertIgnoreScope()) { connInfo = ConnectionInformationDialog.CreateConnectionInformation(viewModel, emptyPassword); } // Verify Assert.IsNull(connInfo, "No ConnectionInformation should be returned with an invalid model"); }
public void ConnectionInformationDialog_CreateConnectionInformation_InvalidModel_ReturnsNull() { // Arrange ConnectionInfoDialogViewModel viewModel = ConnectionInformationDialog.CreateViewModel(null); viewModel.IsValid.Should().BeFalse("Empty view model should be invalid"); var emptyPassword = new SecureString(); // Act ConnectionInformation connInfo; using (var assertIgnoreScope = new AssertIgnoreScope()) { connInfo = ConnectionInformationDialog.CreateConnectionInformation(viewModel, emptyPassword); } // Assert connInfo.Should().BeNull("No ConnectionInformation should be returned with an invalid model"); }