コード例 #1
0
ファイル: ThenSemanticsTests.cs プロジェクト: goeran/TinyBDD
        public void Setup()
        {
            semanticModelState = new SM.AAAMemento();
            semanticModel = new SM.AAA(semanticModelState);
            semanticModel.Act("user checkout", () => { });

            thenSemantics = new ThenSemantics(this, semanticModel);
        }
コード例 #2
0
ファイル: ScenarioClass.cs プロジェクト: goeran/TinyBDD
        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
ファイル: AAAMemento.cs プロジェクト: goeran/TinyBDD
        public AAAMemento Copy()
        {
            var newMemento = new AAAMemento();
            newMemento.Text = Text;
            newMemento.Arranges.AddRange(Arranges);

            foreach (var act in Acts)
                newMemento.Acts.Add(act.Key, act.Value);

            return newMemento;
        }
コード例 #4
0
ファイル: DslTests.cs プロジェクト: goeran/TinyBDD
        public void Setup()
        {
            semanticModelState = Scenario.Nytt("Timelønnte i OM bedrifter skal reguleres en gang i kvartalet", this, scenario =>
            {
                scenario.Gitt("bedriften har ansatte knyttet til en OM avtale")
                        .Og("det er nytt kvartal");

                scenario.Når("kjører bestandsbehandling");

                scenario.Så("skal vi summere opptjent lønn i forrige kvartal")
                        .Og("timelønnte skal reguleres");

            });
        }
コード例 #5
0
ファイル: AAATests.cs プロジェクト: goeran/TinyBDD
        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");
        }
コード例 #6
0
ファイル: AAAMementoTests.cs プロジェクト: goeran/TinyBDD
        public void Assure_its_cloneable()
        {
            var state = new AAAMemento();
            state.Text = "When login";
            state.Arranges.Add(new Arrange("ViewModel is created", () => { }));
            state.Acts.Add(new Act("login", () => {}), new List<Assert>());
            state.Acts.First().Value.Add(new Assert("assure credentials are validated against the AuthService", () => { }));

            var stateCopy = state.Copy() as AAAMemento;

            stateCopy.Text.ShouldBe(state.Text);
            stateCopy.Arranges.ShouldNotBeNull();
            stateCopy.Arranges.Count.ShouldBe(state.Arranges.Count);
            foreach (var arrange in state.Arranges)
                stateCopy.Arranges.ShouldContain(arrange);

            stateCopy.Acts.ShouldNotBeNull();
            stateCopy.Acts.Count.ShouldBe(state.Acts.Count);
            foreach (var act in state.Acts)
            {
                stateCopy.Acts.Keys.ShouldContain(act.Key);
                stateCopy.Acts.Values.ShouldContain(act.Value);
            }
        }
コード例 #7
0
 protected override void SemanticModelState(AAAMemento semanticModelState)
 {
     this.semanticModelState = semanticModelState;
 }
コード例 #8
0
ファイル: Act.cs プロジェクト: goeran/TinyBDD
 public Act(string text, Action action, AAAMemento memento)
     : this(text, action)
 {
     this.memento = memento;
 }
コード例 #9
0
ファイル: SemanticsTests.cs プロジェクト: goeran/TinyBDD
 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";
 }
コード例 #10
0
ファイル: ScenarioClassSpecs.cs プロジェクト: goeran/TinyBDD
 protected void SetupContext()
 {
     semanticModelState = new AAAMemento();
     scenario = new Changeset_notification(semanticModelState);
 }
コード例 #11
0
ファイル: AAA.cs プロジェクト: goeran/TinyBDD
 public AAA(AAAMemento memento)
     : this()
 {
     this.memento = memento;
 }
コード例 #12
0
ファイル: AAA.cs プロジェクト: goeran/TinyBDD
 public AAA()
 {
     this.memento = new AAAMemento();
 }
コード例 #13
0
ファイル: GivenSemanticsTests.cs プロジェクト: goeran/TinyBDD
 public void Setup()
 {
     semanticModelState = new SM.AAAMemento();
     semanticModel = new SM.AAA(semanticModelState);
     givenSemantics = new GivenSemantics(this, semanticModel);
 }
コード例 #14
0
ファイル: Scenario.cs プロジェクト: goeran/TinyBDD
 private Scenario()
 {
     Tilstand = new AAAMemento();
     semantiskModel = new AAA(Tilstand);
 }
コード例 #15
0
 public void Setup()
 {
     state = new AAAMemento();
     semanticModel = new AAA(state);
     specGenerator = new TextSpecGenerator();
 }
コード例 #16
0
ファイル: ScenarioClass.cs プロジェクト: goeran/TinyBDD
 protected virtual void SemanticModelState(AAAMemento semanticModelState)
 {
 }
コード例 #17
0
ファイル: SemantikkTests.cs プロジェクト: goeran/TinyBDD
 protected void SettOppTest()
 {
     semantiskModelTilstand = new AAAMemento();
     semantiskModel = new AAA(semantiskModelTilstand);
 }
コード例 #18
0
ファイル: ScenarioClassSpecs.cs プロジェクト: goeran/TinyBDD
 public Changeset_notification(AAAMemento semanticModelState)
     : base(semanticModelState)
 {
 }