public void TestAddTwoStrings() { var _p = new Harry(); var _newString = _p.AddTwoStrings("Hello", "World"); Assert.Equal(_newString, "Hello World"); }
public void TestGetStringLength() { var _p = new Harry(); int i = _p.GetStringLength("Hello world"); Assert.Equal(11, i); }
protected override void CreateScene() { this.VirtualScreenManager.Activate(App.PreferredWidth, App.PreferredHeight, StretchMode.Uniform); var camera = new FixedCamera2D("defaultCamera2D"); this.EntityManager.Add(camera); this.AddBackground(); var harry = new Harry(); this.EntityManager.Add(harry); var scoreBehavior = new ScoreBehavior(); var mapGenerationBehavior = new MapGenerationBehavior(scoreBehavior); this.AddSceneBehavior(mapGenerationBehavior, SceneBehavior.Order.PreUpdate); this.AddSceneBehavior(new CollisionDetectionBehavior(harry, mapGenerationBehavior, scoreBehavior), SceneBehavior.Order.PostUpdate); this.AddSceneBehavior(scoreBehavior, SceneBehavior.Order.PostUpdate); #if DEBUG this.AddSceneBehavior(new DebugSceneBehavior(), SceneBehavior.Order.PostUpdate); #endif }
public CollisionDetectionBehavior(Harry harry, MapGenerationBehavior mapGenerationBehavior, ScoreBehavior scoreBehavior) { this.harry = harry; this.mapGenerationBehavior = mapGenerationBehavior; this.scoreBehavior = scoreBehavior; }
public void Test1() { var _stack = new Harry(); Assert.IsType <Kwe.Harry>(_stack); }