Description of BddFeatureCmdletBase.
Inheritance: BddCmdletBase
コード例 #1
0
ファイル: BDDHelper.cs プロジェクト: lddd99/guiatuomation
        public static void CreateNewFeature(BddFeatureCmdletBase cmdlet)
        {
            var scenarioClass = new ScenarioProcessingClass();

            scenarioClass.SetupFeature(
                cmdlet.FeatureName,
                cmdlet.AsA,
                cmdlet.IWant,
                cmdlet.SoThat);

            scenarioClass.MainSetup();

            BDDAddinData.Features.Add(scenarioClass);

            cmdlet.WriteObject(cmdlet, scenarioClass.FeatureCreated);
        }
コード例 #2
0
ファイル: BDDHelper.cs プロジェクト: apetrovskiy/STUPS
        public static void CreateNewFeature(BddFeatureCmdletBase cmdlet)
        {
            var scenarioClass = new ScenarioProcessingClass();

            scenarioClass.SetupFeature(
                cmdlet.FeatureName,
                cmdlet.AsA,
                cmdlet.IWant,
                cmdlet.SoThat);

            scenarioClass.MainSetup();
            
            BDDAddinData.Features.Add(scenarioClass);

            cmdlet.WriteObject(cmdlet, scenarioClass.FeatureCreated);
        }
コード例 #3
0
        public static NBehave.Narrator.Framework.Feature GetNewBDDSuite(
            string featureName,
            string asA,
            string iWant,
            string soThat)
        {
            //throw new NotImplementedException();
            
            
//            NewSuiteCmdletBase cmdlet =
//                new NewSuiteCmdletBase();
//            //cmdlet.UnitTestMode = true;
//            if (null != name && string.Empty != name) {
//                cmdlet.Name = name;
//            }
//            if (null != id && string.Empty != id) {
//                cmdlet.Id = id;
//            }
//            if (null != description && string.Empty != description) {
//                cmdlet.Description = description;
//            }
//            
//            TmxNewTestSuiteCommand command =
//                new TmxNewTestSuiteCommand(cmdlet);
//            command.Execute();
//            
//            return (ITestSuite)CommonCmdletBase.UnitTestOutput[CommonCmdletBase.UnitTestOutput.Count - 1];
            /*
            var cmdlet = new BDDFeatureCmdletBase();
            cmdlet.FeatureName = featureName;
            cmdlet.AsA = asA;
            cmdlet.IWant = iWant;
            cmdlet.SoThat = soThat;
            
            var command = new BDDNewFeatureCommand(cmdlet);
            command.Execute();
            */
			
            // temporarily
            // 20150129
            
            var cmdlet = new BddFeatureCmdletBase {
				FeatureName = featureName,
				AsA = asA,
				IWant = iWant,
				SoThat = soThat
			};
            
            var command = new BddNewFeatureCommand(cmdlet);
            command.Execute();
            
            //return ((NBehave.Narrator.Framework.Feature)CommonCmdletBase.UnitTestOutput[CommonCmdletBase.UnitTestOutput.Count - 1]);
Console.WriteLine("GetNewBDDSuite: 0001");
try {
    Console.WriteLine(((NBehave.Narrator.Framework.Feature)(object)UnitTestOutput.LastOutput[0]));
}
catch (Exception e00) {
    Console.WriteLine(e00.Message);
    Console.WriteLine(e00.GetType().Name);
}
try {
    Console.WriteLine(((NBehave.Narrator.Framework.Feature)(object)UnitTestOutput.Count));
}
catch (Exception e01) {
    Console.WriteLine(e01.Message);
    Console.WriteLine(e01.GetType().Name);
}
try {
    Console.WriteLine(((NBehave.Narrator.Framework.Feature)(object)UnitTestOutput.LastOutput[0]));
}
catch (Exception e02) {
    Console.WriteLine(e02.Message);
    Console.WriteLine(e02.GetType().Name);
}
            return ((NBehave.Narrator.Framework.Feature)(object)UnitTestOutput.LastOutput[0]);
        }