public void CurrentFramesReturnsNextFrames() { KarassFactory karassFactory = new KarassFactory(); IDependencies dependencies = new KarassDependencies(); FrameFactory frameFactory = new FrameFactory(dependencies); MockFramesFactory mockFramesFactory = new MockFramesFactory(frameFactory); IKarass karass = karassFactory.Get(new List <Action>(), new List <Action>(), new List <FrameRequest[]>() { new FrameRequest[] { mockFramesFactory.GetValidFrameRequest((_) => true), mockFramesFactory.GetValidFrameRequest((_) => true), mockFramesFactory.GetValidFrameRequest((_) => true), mockFramesFactory.GetValidFrameRequest((_) => true), mockFramesFactory.GetValidFrameRequest((_) => true), mockFramesFactory.GetValidFrameRequest((_) => true), mockFramesFactory.GetValidFrameRequest((_) => true), mockFramesFactory.GetValidFrameRequest((_) => true), mockFramesFactory.GetValidFrameRequest((_) => true), mockFramesFactory.GetValidFrameRequest((_) => true), } }); Assert.True(karass.FramesCollection[0].Length == 10); KanKan kanKan = new KanKan(karass, frameFactory); for (int i = 0; i < 10; i++) { Assert.AreEqual(kanKan.Current, kanKan.CurrentState.NextFrames); kanKan.MoveNext(); } }
public string ThenCorrectlyReturnType(string name) { KarassDependencies dependencies = new KarassDependencies(); TestClass testClass = new TestClass(name); dependencies.Register <ITestInterface>(() => testClass); ITestInterface t = dependencies.Get <ITestInterface>(); return(t.Test()); }