Exemplo n.º 1
0
        public void Does_not_have_any_bodies()
        {
            var entity     = new Guid("3287aac0-a616-44d4-94ab-39c24aba887c");
            var bodies     = InMemoryBodies.Empty();
            var actualBody = bodies.BodyForEntity(entity);

            Assert.IsNull(actualBody);
        }
Exemplo n.º 2
0
        public void Does_not_support_a_null_body()
        {
            var  bodies = InMemoryBodies.Empty();
            Body body   = null;

            Assert.Throws <ArgumentNullException>(() =>
            {
                bodies.AddBody(body);
            });
        }
Exemplo n.º 3
0
        public void Makes_that_body_the_one_for_that_entity()
        {
            var bodies = InMemoryBodies.Empty();
            var entity = new Guid("eddc06dc-e22f-450b-a270-2c395716d1d9");

            Assert.IsNull(bodies.BodyForEntity(entity));
            var entityLocation = new Vector3(0.0f, 0.0f, 0.0f);
            var body           = Body.ForEntityLocatedAt(
                entity,
                entityLocation);

            bodies.AddBody(body);
            var entitysBody = bodies.BodyForEntity(entity);

            Assert.IsNotNull(bodies.BodyForEntity(entity));
            Assert.AreEqual(
                entity,
                entitysBody.Entity);
        }