示例#1
0
        public void Setup()
        {
            semanticModelState = new SM.AAAMemento();
            semanticModel = new SM.AAA(semanticModelState);
            semanticModel.Act("user checkout", () => { });

            thenSemantics = new ThenSemantics(this, semanticModel);
        }
示例#2
0
        public ScenarioClass(AAAMemento semanticModelState)
        {
            this.semanticModel = new AAA(semanticModelState);
            this.semanticModelState = semanticModelState;
            this.scenario = new Semantics(this, semanticModel);
            this.specGenerator = new TextSpecGenerator();
            this.metadataParser = new TestMetadataParser(this);

            semanticModelState.Text = metadataParser.TranslateTestClassNameToText();
        }
示例#3
0
        public void Should_be_ble_to_execute_without_arrange()
        {
            var output = "";
            var newAAA = new AAA();
            newAAA.Act("Act1", () =>
                output += "Act1");
            newAAA.Assert("Assert1", () =>
                output += "Assert1");

            newAAA.Execute();

            output.ShouldBe("Act1Assert1");
        }
示例#4
0
        public void Setup()
        {
            output = "";
            semanticModelMemento = new AAAMemento();
            semanticModel = new AAA(semanticModelMemento);

            semanticModel.Text("A description of the semanticModel instance");

            semanticModel.Arrange("Arrange", () => output += "Arrange");

            semanticModel.Act("Act1", () => output += "Act1");

            semanticModel.Assert("Assert1", () => output += "Assert1");

            semanticModel.Act("Act2", () => output += "Act2");

            semanticModel.Assert("Assert2", () => output += "Assert2");
        }
示例#5
0
 public Semantikk(AAA semantiskModel, object test)
 {
     this.test = test;
     this.semantiskModel = semantiskModel;
     this.metadataParser = new TestMetadataParser(test);
 }
示例#6
0
 protected void SettOppTest()
 {
     semantiskModelTilstand = new AAAMemento();
     semantiskModel = new AAA(semantiskModelTilstand);
 }
示例#7
0
 public void Setup()
 {
     state = new AAAMemento();
     semanticModel = new AAA(state);
     specGenerator = new TextSpecGenerator();
 }
示例#8
0
 public void Setup()
 {
     semanticModelState = new SM.AAAMemento();
     semanticModel = new SM.AAA(semanticModelState);
     semantics = new Semantics(this, semanticModel);
     there_are_changesets_in_SourceControl = "there are changesets in SourceControl";
 }
示例#9
0
        public void Should_not_be_able_to_do_assertions_without_at_least_one_act()
        {
            var newSemanticModel = new AAA();
            newSemanticModel.Arrange("Arrange", () => { });

            this.ShouldThrowException<SemanticModelException>(() =>
                newSemanticModel.Assert("Assert", () => { }), ex =>
                    ex.Message.ShouldBe("Can not assert without any acts specified"));
        }
示例#10
0
        public void Should_rearrange_for_every_acts()
        {
            var number = 0;

            var newAAA = new AAA();

            newAAA.Arrange("Set start value", () =>
                number = 1);

            newAAA.Act("Multiply with two", () =>
                number *= 2);
            newAAA.Assert("Value should be two", () =>
                number.ShouldBe(2));

            newAAA.Act("Multiply with four", () =>
                number *= 4);
            newAAA.Assert("Value should be four", () =>
                number.ShouldBe(4));

            newAAA.Execute();
        }
示例#11
0
 public void Setup()
 {
     semanticModelState = new SM.AAAMemento();
     semanticModel = new SM.AAA(semanticModelState);
     givenSemantics = new GivenSemantics(this, semanticModel);
 }
示例#12
0
 private Scenario()
 {
     Tilstand = new AAAMemento();
     semantiskModel = new AAA(Tilstand);
 }