Slide 24
Slide 24 text
[TestFixture]
public class UserCharacterDataTest : ZenjectUnitTestFixture
class MasterDataManagerMock : IMasterDataManager {
public MasterCharacter GetMasterCharacterById(int id
// いい感じに返す
}
}
[Test]
public void GetMaxHpTest() {
Container.Bind()
.FromNew().AsCached().WithArguments(1, 10);
Container.Bind()
.To()
.FromNew().AsSingle();
var chara = Container.Resolve();
Assert.AreEqual(100, chara.GetMaxHp());
}
}