formatting
parent
d9756e0c3d
commit
700f10f31e
|
@ -5,7 +5,8 @@ using Encompass;
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace Tests {
|
||||
namespace Tests
|
||||
{
|
||||
public class EngineTest
|
||||
{
|
||||
static IEnumerable<MockComponent> resultComponents;
|
||||
|
@ -105,7 +106,8 @@ namespace Tests {
|
|||
public override void Update(float dt)
|
||||
{
|
||||
var component = this.ReadComponent<MockComponent>();
|
||||
this.UpdateComponent(component, (MockComponent comp) => {
|
||||
this.UpdateComponent(component, (MockComponent comp) =>
|
||||
{
|
||||
comp.myInt = 420;
|
||||
comp.myString = "blaze it";
|
||||
return comp;
|
||||
|
@ -141,7 +143,8 @@ namespace Tests {
|
|||
public override void Update(float dt)
|
||||
{
|
||||
var component = this.ReadComponent<MockComponent>();
|
||||
this.UpdateComponent(component, (MockComponent comp) => {
|
||||
this.UpdateComponent(component, (MockComponent comp) =>
|
||||
{
|
||||
comp.myInt = 420;
|
||||
comp.myString = "blaze it";
|
||||
return comp;
|
||||
|
@ -166,7 +169,7 @@ namespace Tests {
|
|||
|
||||
var world = worldBuilder.Build();
|
||||
|
||||
var ex =Assert.Throws<IllegalComponentMutationException>(() => world.Update(0.01f));
|
||||
var ex = Assert.Throws<IllegalComponentMutationException>(() => world.Update(0.01f));
|
||||
Assert.That(ex.Message, Is.EqualTo("Engine UndeclaredUpdateComponentTestEngine tried to mutate undeclared Component MockComponent"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue