Fix for srGen designer issues (#321)

* removing designer files

* adding designer files to gitignore

* updating refs and tests
This commit is contained in:
Raymond Martin
2017-04-19 11:08:45 -07:00
committed by GitHub
parent 8c0885da88
commit 84ec20d2ae
11 changed files with 110 additions and 1388 deletions

View File

@@ -6,9 +6,7 @@
using System.Globalization;
using Xunit;
using ServiceLayerSr = Microsoft.SqlTools.ServiceLayer.Localization.sr;
using HostingSr = Microsoft.SqlTools.Hosting.Localization.sr;
using CredentialSr = Microsoft.SqlTools.Credentials.Localization.sr;
using ServiceLayerSr = Microsoft.SqlTools.ServiceLayer.SR;
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
{
@@ -20,13 +18,13 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
[Fact]
public void SrPropertiesTest()
{
Assert.NotNull(SR.QueryServiceSubsetBatchNotCompleted);
Assert.NotNull(SR.QueryServiceFileWrapperWriteOnly);
Assert.NotNull(SR.QueryServiceFileWrapperNotInitialized);
Assert.NotNull(SR.QueryServiceColumnNull);
Assert.NotNull(ServiceLayerSr.ResourceManager);
ServiceLayerSr.Culture = CultureInfo.CurrentCulture;
// Assert all needed constants exist
Assert.NotNull(ServiceLayerSr.QueryServiceSubsetBatchNotCompleted);
Assert.NotNull(ServiceLayerSr.QueryServiceFileWrapperWriteOnly);
Assert.NotNull(ServiceLayerSr.QueryServiceFileWrapperNotInitialized);
Assert.NotNull(ServiceLayerSr.QueryServiceColumnNull);
Assert.NotNull(ServiceLayerSr.Culture);
Assert.NotNull(ServiceLayerSr.BatchParser_CircularReference);
Assert.NotNull(ServiceLayerSr.BatchParser_CommentNotTerminated);
@@ -42,19 +40,14 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
Assert.NotNull(ServiceLayerSr.ConnectionParamsValidateNullConnection);
Assert.NotNull(ServiceLayerSr.ConnectionParamsValidateNullOwnerUri);
Assert.NotNull(ServiceLayerSr.ConnectionParamsValidateNullServerName);
Assert.NotNull(ServiceLayerSr.ConnectionParamsValidateNullSqlAuth);
Assert.NotNull(ServiceLayerSr.ConnectionParamsValidateNullSqlAuth(""));
Assert.NotNull(ServiceLayerSr.ConnectionServiceConnectErrorNullParams);
Assert.NotNull(ServiceLayerSr.ConnectionServiceConnectionCanceled);
Assert.NotNull(ServiceLayerSr.ConnectionServiceConnStringInvalidAuthType);
Assert.NotNull(ServiceLayerSr.ConnectionServiceConnStringInvalidIntent);
Assert.NotNull(ServiceLayerSr.ConnectionServiceDbErrorDefaultNotConnected);
Assert.NotNull(ServiceLayerSr.ConnectionServiceListDbErrorNotConnected);
Assert.NotNull(ServiceLayerSr.ConnectionServiceConnStringInvalidAuthType(""));
Assert.NotNull(ServiceLayerSr.ConnectionServiceConnStringInvalidIntent(""));
Assert.NotNull(ServiceLayerSr.ConnectionServiceDbErrorDefaultNotConnected(""));
Assert.NotNull(ServiceLayerSr.ConnectionServiceListDbErrorNotConnected(""));
Assert.NotNull(ServiceLayerSr.ConnectionServiceListDbErrorNullOwnerUri);
Assert.Null(ServiceLayerSr.CredentialServiceWin32CredentialDisposed);
Assert.Null(ServiceLayerSr.CredentialsServiceInvalidCriticalHandle);
Assert.Null(ServiceLayerSr.CredentialsServicePasswordLengthExceeded);
Assert.Null(ServiceLayerSr.CredentialsServiceTargetForDelete);
Assert.Null(ServiceLayerSr.CredentialsServiceTargetForLookup);
Assert.NotNull(ServiceLayerSr.EE_BatchError_Exception);
Assert.NotNull(ServiceLayerSr.EE_BatchExecutionError_Halting);
Assert.NotNull(ServiceLayerSr.EE_BatchExecutionError_Ignoring);
@@ -73,20 +66,14 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
Assert.NotNull(ServiceLayerSr.EE_ScriptError_ParsingSyntax);
Assert.NotNull(ServiceLayerSr.EE_ScriptError_Warning);
Assert.NotNull(ServiceLayerSr.ErrorEmptyStringReplacement);
Assert.Null(ServiceLayerSr.HostingHeaderMissingColon);
Assert.Null(ServiceLayerSr.HostingHeaderMissingContentLengthHeader);
Assert.Null(ServiceLayerSr.HostingHeaderMissingContentLengthValue);
Assert.Null(ServiceLayerSr.HostingUnexpectedEndOfStream);
Assert.Null(ServiceLayerSr.IncompatibleServiceForExtensionLoader);
Assert.Null(ServiceLayerSr.MultipleServicesFound);
Assert.NotNull(ServiceLayerSr.PeekDefinitionAzureError);
Assert.NotNull(ServiceLayerSr.PeekDefinitionAzureError(""));
Assert.NotNull(ServiceLayerSr.PeekDefinitionDatabaseError);
Assert.NotNull(ServiceLayerSr.PeekDefinitionError);
Assert.NotNull(ServiceLayerSr.PeekDefinitionError(""));
Assert.NotNull(ServiceLayerSr.PeekDefinitionNoResultsError);
Assert.NotNull(ServiceLayerSr.PeekDefinitionNotConnectedError);
Assert.NotNull(ServiceLayerSr.PeekDefinitionTimedoutError);
Assert.NotNull(ServiceLayerSr.QueryServiceAffectedOneRow);
Assert.NotNull(ServiceLayerSr.QueryServiceAffectedRows);
Assert.NotNull(ServiceLayerSr.QueryServiceAffectedRows(0));
Assert.NotNull(ServiceLayerSr.QueryServiceCancelAlreadyCompleted);
Assert.NotNull(ServiceLayerSr.QueryServiceCancelDisposeFailed);
Assert.NotNull(ServiceLayerSr.QueryServiceColumnNull);
@@ -94,37 +81,32 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
Assert.NotNull(ServiceLayerSr.QueryServiceDataReaderByteCountInvalid);
Assert.NotNull(ServiceLayerSr.QueryServiceDataReaderCharCountInvalid);
Assert.NotNull(ServiceLayerSr.QueryServiceDataReaderXmlCountInvalid);
Assert.NotNull(ServiceLayerSr.QueryServiceErrorFormat);
Assert.NotNull(ServiceLayerSr.QueryServiceErrorFormat(0,0,0,0,"",""));
Assert.NotNull(ServiceLayerSr.QueryServiceExecutionPlanNotFound);
Assert.NotNull(ServiceLayerSr.QueryServiceFileWrapperNotInitialized);
Assert.NotNull(ServiceLayerSr.QueryServiceFileWrapperReadOnly);
Assert.NotNull(ServiceLayerSr.QueryServiceFileWrapperWriteOnly);
Assert.NotNull(ServiceLayerSr.QueryServiceMessageSenderNotSql);
Assert.NotNull(ServiceLayerSr.QueryServiceQueryCancelled);
Assert.NotNull(ServiceLayerSr.QueryServiceQueryFailed);
Assert.NotNull(ServiceLayerSr.QueryServiceQueryFailed(""));
Assert.NotNull(ServiceLayerSr.QueryServiceQueryInProgress);
Assert.NotNull(ServiceLayerSr.QueryServiceQueryInvalidOwnerUri);
Assert.NotNull(ServiceLayerSr.QueryServiceRequestsNoQuery);
Assert.NotNull(ServiceLayerSr.QueryServiceResultSetNoColumnSchema);
Assert.NotNull(ServiceLayerSr.QueryServiceResultSetNotRead);
Assert.Null(ServiceLayerSr.QueryServiceResultSetReaderNull);
Assert.NotNull(ServiceLayerSr.QueryServiceResultSetRowCountOutOfRange);
Assert.NotNull(ServiceLayerSr.QueryServiceResultSetStartRowOutOfRange);
Assert.NotNull(ServiceLayerSr.QueryServiceSaveAsFail);
Assert.NotNull(ServiceLayerSr.QueryServiceSaveAsFail("",""));
Assert.NotNull(ServiceLayerSr.QueryServiceSaveAsInProgress);
Assert.NotNull(ServiceLayerSr.QueryServiceSaveAsMiscStartingError);
Assert.NotNull(ServiceLayerSr.QueryServiceSaveAsResultSetNotComplete);
Assert.NotNull(ServiceLayerSr.QueryServiceSubsetBatchNotCompleted);
Assert.NotNull(ServiceLayerSr.QueryServiceSubsetBatchOutOfRange);
Assert.NotNull(ServiceLayerSr.QueryServiceSubsetResultSetOutOfRange);
Assert.Null(ServiceLayerSr.ServiceAlreadyRegistered);
Assert.Null(ServiceLayerSr.ServiceNotFound);
Assert.Null(ServiceLayerSr.ServiceNotOfExpectedType);
Assert.Null(ServiceLayerSr.ServiceProviderNotSet);
Assert.NotNull(ServiceLayerSr.TestLocalizationConstant);
Assert.NotNull(ServiceLayerSr.TroubleshootingAssistanceMessage);
Assert.NotNull(ServiceLayerSr.WorkspaceServiceBufferPositionOutOfOrder);
Assert.NotNull(ServiceLayerSr.WorkspaceServicePositionColumnOutOfRange);
Assert.NotNull(ServiceLayerSr.WorkspaceServiceBufferPositionOutOfOrder(0,0,0,0));
Assert.NotNull(ServiceLayerSr.WorkspaceServicePositionColumnOutOfRange(0));
Assert.NotNull(ServiceLayerSr.WorkspaceServicePositionLineOutOfRange);
}
}