Ejemplo n.º 1
0
        static TestingContext()
        {
            _library = new Lazy<FixtureLibrary>(() =>
            {
                try
                {
                    var fixture = new SentenceFixture();
                    var library = FixtureLibrary.CreateForAppDomain(new GrammarSystem().Start());

                    // Need to force it to use this one instead of the FactFixture in the samples project
                    var factFixture = new StoryTeller.Testing.EndToEndExecution.FactFixture();
                    library.Models["Fact"] = factFixture.Compile(CellHandling.Basic());
                    library.Fixtures["Fact"] = factFixture;

                    return library;
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                    throw;
                }
            });


        }
        public void smoke_test_of_fixture_model_serialization()
        {
            var fixture = new SentenceFixture();
            var model = fixture.Compile(CellHandling.Basic());

            var json = JsonSerialization.ToCleanJson(model);

            Debug.WriteLine(json);
        }
Ejemplo n.º 3
0
        static TestingContext()
        {
            _library = new Lazy<FixtureLibrary>(() =>
            {
                try
                {
                    var fixture = new SentenceFixture();
                    return FixtureLibrary.CreateForAppDomain(new GrammarSystem().Start());
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                    throw;
                }
            });


        }