示例#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 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
        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
        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
        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
 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
 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
 public void Setup()
 {
     semanticModelState = new SM.AAAMemento();
     semanticModel = new SM.AAA(semanticModelState);
     givenSemantics = new GivenSemantics(this, semanticModel);
 }
示例#14
0
 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
 protected virtual void SemanticModelState(AAAMemento semanticModelState)
 {
 }
示例#17
0
 protected void SettOppTest()
 {
     semantiskModelTilstand = new AAAMemento();
     semantiskModel = new AAA(semantiskModelTilstand);
 }
示例#18
0
 public Changeset_notification(AAAMemento semanticModelState)
     : base(semanticModelState)
 {
 }