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

            thenSemantics = new ThenSemantics(this, semanticModel);
        }
Example #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();
        }
Example #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;
        }
Example #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");

            });
        }
Example #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");
        }
Example #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);
            }
        }
Example #7
0
 protected override void SemanticModelState(AAAMemento semanticModelState)
 {
     this.semanticModelState = semanticModelState;
 }
Example #8
0
 public Act(string text, Action action, AAAMemento memento)
     : this(text, action)
 {
     this.memento = memento;
 }
Example #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";
 }
Example #10
0
 protected void SetupContext()
 {
     semanticModelState = new AAAMemento();
     scenario = new Changeset_notification(semanticModelState);
 }
Example #11
0
 public AAA(AAAMemento memento)
     : this()
 {
     this.memento = memento;
 }
Example #12
0
 public AAA()
 {
     this.memento = new AAAMemento();
 }
Example #13
0
 public void Setup()
 {
     semanticModelState = new SM.AAAMemento();
     semanticModel = new SM.AAA(semanticModelState);
     givenSemantics = new GivenSemantics(this, semanticModel);
 }
Example #14
0
 private Scenario()
 {
     Tilstand = new AAAMemento();
     semantiskModel = new AAA(Tilstand);
 }
Example #15
0
 public void Setup()
 {
     state = new AAAMemento();
     semanticModel = new AAA(state);
     specGenerator = new TextSpecGenerator();
 }
Example #16
0
 protected virtual void SemanticModelState(AAAMemento semanticModelState)
 {
 }
Example #17
0
 protected void SettOppTest()
 {
     semantiskModelTilstand = new AAAMemento();
     semantiskModel = new AAA(semantiskModelTilstand);
 }
Example #18
0
 public Changeset_notification(AAAMemento semanticModelState)
     : base(semanticModelState)
 {
 }