Пример #1
0
        public void ShouldDOWHAT()
        {
            //GIVEN
            var context = new ComponentDriver();

            context.Start();
            var johnny = UserDtoBuilder.AUser().Adult();

            //WHEN
            context.Create(johnny);

            //THEN
            context.ShouldReportSuccessfulCreationOf(johnny);
        }
        public RootDriver()
        {
            CurrentThread = Thread.CurrentThread;

            ContextPtr = CoreInternals.Context_New();

            ActorDriver     = new ActorDriver(this);
            WorldDriver     = new WorldDriver(this);
            CoreDriver      = new CoreDriver(this);
            EngineDriver    = new EngineDriver(this);
            ComponentDriver = new ComponentDriver(this);

            ResourcesCollection = new ResourceCollection(this);
            ComponentCollection = new ComponentCollection();
            // Setup Internal Drivers
            ResourceManagerDriver = new ResourceManagerDriver(this);
            MeshDriver            = new MeshDriver(this);
        }
Пример #3
0
        public void ShouldDOWHAT2()
        {
            //GIVEN
            var context = new ComponentDriver();

            context.Start();
            var johnny = UserDtoBuilder.AUser().Adult();
            var kate   = UserDtoBuilder.AUser().Adult();

            context.Create(johnny);
            context.Create(kate);

            //WHEN
            var probablyJohnny = context.Get(johnny);
            var probablyKate   = context.Get(kate);

            //THEN
            probablyJohnny.ShouldBe(johnny);
            probablyKate.ShouldBe(kate);
        }