public void TestConfigureFileHelperConstructor01() { ConfigureFileHelper configureFileHelper = new ConfigureFileHelper(); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)configureFileHelper.AboutMessage); recorder.Record((string)configureFileHelper.ConnectionStringConfig); recorder.Record((string)configureFileHelper.ConnectionStringViewer); recorder.Record((string)configureFileHelper.DefaultFolder); recorder.Record((int)configureFileHelper.DefaultLineThickness); recorder.Record((bool)configureFileHelper.EnableSmartLabel); recorder.Record((bool)configureFileHelper.EncodingChange); recorder.Record((string)configureFileHelper.HostIPAddress); recorder.Record((string)configureFileHelper.LanguageStr); recorder.Record((string)configureFileHelper.OPCDTSever1Host); recorder.Record((string)configureFileHelper.OPCDTSever1Name); recorder.Record((string)configureFileHelper.OPCDTSever2Host); recorder.Record((string)configureFileHelper.OPCDTSever2Name); recorder.Record((string)configureFileHelper.OPCServerName); recorder.Record((string)configureFileHelper.OPCServerRootName); recorder.Record((int)configureFileHelper.ScreenWidth); recorder.FinishRecording(); #endregion }
public void TestGetAllOPCSampelGrp01() { OPCSampleGrpConfigStartModel oPCSampleGrpConfigStartModel = OPCSampleGrpConfigStartModelFactory.CreateOPCSampleGrpConfigStartModel01(); string sortCol = string.Empty; string sortingOrder = string.Empty; int lowerRecord = -1; int upperRecord = 1; List <EtyDataLogDPGroupTrend> list = oPCSampleGrpConfigStartModel.GetAllOPCSampelGrp(sortCol, sortingOrder, lowerRecord, upperRecord); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record <int>(delegate { return((int)list.Capacity); }); recorder.Record <int>(delegate { return((int)list.Count); }); recorder.Record <bool>(delegate { return((bool)ReflectionAccessor.Wrap(list).GetProperty("System.Collections.Generic.ICollection<T>.IsReadOnly")); }); recorder.Record <bool>(delegate { return((bool)ReflectionAccessor.Wrap(list).GetProperty("System.Collections.ICollection.IsSynchronized")); }); recorder.Record <bool>(delegate { return((bool)ReflectionAccessor.Wrap(list).GetProperty("System.Collections.IList.IsFixedSize")); }); recorder.Record <bool>(delegate { return((bool)ReflectionAccessor.Wrap(list).GetProperty("System.Collections.IList.IsReadOnly")); }); recorder.FinishRecording(); #endregion // ExpectedException custom attribute was generated instead of // assertions since the test threw System.ArgumentOutOfRangeException #region PostConditionCheck Assert.AreEqual(0, list.Count); #endregion //Test2 ---- Valid Input sortCol = OPCSampleGrpConfigStart.OPCSAMPLEGRPDESC_COL_NAME; sortingOrder = OPCSampleGrpConfigStart.OPCSAMPLEGRP_SORT_ASC; lowerRecord = 0; upperRecord = 8; list = oPCSampleGrpConfigStartModel.GetAllOPCSampelGrp(sortCol, sortingOrder, lowerRecord, upperRecord); #region PostConditionCheck //Assert.Greater(0, list.Count); #endregion }
public void TestBooleanOrConstructor01() { BooleanOr booleanOr = new BooleanOr(); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)booleanOr.Priority); recorder.FinishRecording(); #endregion }
public void TestCreateOp01() { Token type = Token.Add; BinaryOp binaryOp = BinaryOp.CreateOp(type); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.FinishRecording(); #endregion }
public void TestArithmeticSubtractConstructor01() { ArithmeticSubtract arithmeticSubtract = new ArithmeticSubtract(); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)arithmeticSubtract.Priority); recorder.FinishRecording(); #endregion }
public void TestConditionalOpConstructor01() { ConditionalOp conditionalOp = new ConditionalOp(); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)conditionalOp.Priority); recorder.FinishRecording(); #endregion }
public void TestBitwiseAndConstructor01() { BitwiseAnd bitwiseAnd = new BitwiseAnd(); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)bitwiseAnd.Priority); recorder.FinishRecording(); #endregion }
public void TestArithmeticMultiplyConstructor01() { ArithmeticMultiply arithmeticMultiply = new ArithmeticMultiply(); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)arithmeticMultiply.Priority); recorder.FinishRecording(); #endregion }
public void TestCreateContext03() { Context context = CreateContext03(); Assert.IsNotNull(context); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)context.StringValue); recorder.FinishRecording(); #endregion }
public void TestCreateConditionalOpExecutor01() { ConditionalOpExecutor conditionalOpExecutor = CreateConditionalOpExecutor01(); Assert.IsNotNull(conditionalOpExecutor); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((int)ReflectionAccessor.Wrap(conditionalOpExecutor).GetProperty("CurrentIndex")); recorder.FinishRecording(); #endregion }
public void TestCreateVariable01() { Variable variable = CreateVariable01(); Assert.IsNotNull(variable); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)variable.Name); recorder.FinishRecording(); #endregion }
public void TestCreateMemberId01() { MemberId memberId = CreateMemberId01(); Assert.IsNotNull(memberId); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)memberId.Name); recorder.FinishRecording(); #endregion }
public void TestCreateAdditiveOp01() { AdditiveOp additiveOp = CreateAdditiveOp01(); Assert.IsNotNull(additiveOp); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)additiveOp.Priority); recorder.FinishRecording(); #endregion }
public void TestGetOPCDTSmplFlagValue01() { CheckConfigVars checkConfigVars = CheckConfigVarsFactory.CreateCheckConfigVars01(); string str = checkConfigVars.GetOPCDTSmplFlagValue(); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record(str); recorder.FinishRecording(); #endregion }
public void TestCreateConditionalOp01() { ConditionalOp conditionalOp = CreateConditionalOp01(); Assert.IsNotNull(conditionalOp); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)conditionalOp.Priority); recorder.FinishRecording(); #endregion }
public void TestCreateIndexerOp01() { IndexerOp indexerOp = CreateIndexerOp01(); Assert.IsNotNull(indexerOp); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)indexerOp.Priority); recorder.FinishRecording(); #endregion }
public void TestCreateBooleanOr01() { BooleanOr booleanOr = CreateBooleanOr01(); Assert.IsNotNull(booleanOr); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)booleanOr.Priority); recorder.FinishRecording(); #endregion }
public void TestVariableConstructor01() { string name = string.Empty; Variable variable = new Variable(name); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)variable.Name); recorder.FinishRecording(); #endregion }
public void TestCreateBitwiseOp03() { BitwiseOp bitwiseOp = CreateBitwiseOp03(); Assert.IsNotNull(bitwiseOp); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)bitwiseOp.Priority); recorder.FinishRecording(); #endregion }
public void TestCreateIdentifier02() { Identifier identifier = CreateIdentifier02(); Assert.IsNotNull(identifier); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)identifier.Name); recorder.FinishRecording(); #endregion }
public void TestCreateArithmeticDivide01() { ArithmeticDivide arithmeticDivide = CreateArithmeticDivide01(); Assert.IsNotNull(arithmeticDivide); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)arithmeticDivide.Priority); recorder.FinishRecording(); #endregion }
public void TestContextConstructor01() { int startPos = -1; Context context = new Context(startPos); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)context.StringValue); recorder.FinishRecording(); #endregion }
public void TestOpenConnection01() { OPCSampleGrpConfigStartModel oPCSampleGrpConfigStartModel = OPCSampleGrpConfigStartModelFactory.CreateOPCSampleGrpConfigStartModel01(); string connectionString = string.Empty; DBConnectionStrings.ReleaseInstance(); DBConnectionStrings.GetInstance().AddConnectionString(connectionString); bool b = false; try { b = oPCSampleGrpConfigStartModel.OpenConnection(); } catch (System.Exception ex) { } #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record(b); recorder.FinishRecording(); #endregion // ExpectedException custom attribute was generated instead of // assertions since the test threw System.ArgumentOutOfRangeException #region PostConditionCheck //Assert.IsFalse(b); #endregion //Test invalid connection string connectionString = "DataSource: ; UserName =;Password=;"; DBConnectionStrings.ReleaseInstance(); DBConnectionStrings.GetInstance().AddConnectionString(connectionString); try { b = oPCSampleGrpConfigStartModel.OpenConnection(); } catch (System.Exception ex) { } #region PostConditionCheck Assert.IsFalse(b); #endregion //Test valid connection string DBConnectionStrings.ReleaseInstance(); DBConnectionStrings.GetInstance().AddConnectionString(ConfigureFileHelper.GetInstance().ConnectionStringConfig); b = oPCSampleGrpConfigStartModel.OpenConnection(); #region PostConditionCheck Assert.IsTrue(b); #endregion }
public void TestCreateMemberOp01() { MemberOp memberOp = CreateMemberOp01(); Assert.IsNotNull(memberOp); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((bool)memberOp.IsFunction); recorder.Record((OperatorPriority)memberOp.Priority); recorder.FinishRecording(); #endregion }
public void TestContextConstructor02() { Token token = Token.StringMarker; int startPos = int.MaxValue; Context context = new Context(token, startPos); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)context.StringValue); recorder.FinishRecording(); #endregion }
public void TestCreateUnaryOp02() { UnaryOp unaryOp = CreateUnaryOp02(); unaryOp.ToString(); Assert.IsNotNull(unaryOp); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((OperatorPriority)unaryOp.Priority); recorder.FinishRecording(); #endregion }
public void TestInternalError01() { ParserException parserException = ParserException.InternalError(); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record <string>(delegate { return((string)parserException.HelpLink); }); recorder.Record <string>(delegate { return((string)parserException.Message); }); recorder.Record <string>(delegate { return((string)parserException.Source); }); recorder.Record <string>(delegate { return((string)parserException.StackTrace); }); recorder.FinishRecording(); #endregion }
public void TestCreateEvalException02() { EvalException evalException = CreateEvalException02(); Assert.IsNotNull(evalException); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)evalException.HelpLink); recorder.Record((string)evalException.Message); recorder.Record((string)evalException.Source); recorder.Record((string)evalException.StackTrace); recorder.FinishRecording(); #endregion }
public void TestScannerExceptionConstructor01() { Error errorCode = Error.VariableNotExist; ScannerException scannerException = new ScannerException(errorCode); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)scannerException.HelpLink); recorder.Record((string)scannerException.Message); recorder.Record((string)scannerException.Source); recorder.Record((string)scannerException.StackTrace); recorder.FinishRecording(); #endregion }
public void TestParenNotMatch01() { char paren = char.MinValue; ParserException parserException = ParserException.ParenNotMatch(paren); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record <string>(delegate { return((string)parserException.HelpLink); }); recorder.Record <string>(delegate { return((string)parserException.Message); }); recorder.Record <string>(delegate { return((string)parserException.Source); }); recorder.Record <string>(delegate { return((string)parserException.StackTrace); }); recorder.FinishRecording(); #endregion }