public ActionResult Index() { logger.Debug("クラス内に書いたログ - HomeController Index"); logger.Debug("コンストラクタの扱いを以下でテスト"); TestConstructor testConstructor = new TestConstructor("pre test"); return(View()); }
public void ConstructorTest() { TestConstructor testConstructor = Faker.Create <TestConstructor>(); Assert.IsNotNull(testConstructor); Assert.AreEqual(testConstructor.Int, -10); Assert.AreEqual(testConstructor.String, "done"); Assert.AreEqual(testConstructor.Bool, false); }
public static SingularYield getTestSingularGameResourceYield( GameResourceType type = null, int value = 123 ) { type = type ?? getTestGameResourceType(); return(TestConstructor.testBuildObject( () => new SingularYield(type, value) )); }
public static ResourceStockpile GetTestResourceYield( GameResourceType type = null, int value = 100 ) { type = type ?? GameResourceTest.getTestGameResourceType(); return(TestConstructor.testBuildObject( () => new ResourceStockpile(type, value) )); }
public static ResourceYield GetTestFinishedGameResourceYield( params SingularYield[] yields ) { var unfinishedYield = GetTestResourceYield(yields); return(TestConstructor.testBuildObject( () => unfinishedYield.readOnly() )); }
public static AbstractImage GetTestAbstractImage( int?id = null, string path = null ) { int _id = id.GetValueOrDefault(0); path = path ?? "/dev/null"; return(TestConstructor.testBuildObject( () => new AbstractImage( id: _id, path: path ) )); }
public static GameResourceType getTestGameResourceType( int id = 0, string name = "TestResourceType", string desc = "TestDescription", string unit = "TestUnit" ) { return(TestConstructor.testBuildObject( () => new GameResourceType( id: id, name: name, description: desc, units: unit ) )); }
public static MutableResourceYield GetTestResourceYield( params SingularYield[] yields ) { yields = yields ?? new[] { getTestSingularGameResourceYield() }; return(TestConstructor.testBuildObject( () => { var unfinishedYield = new MutableResourceYield(); foreach (var yield in yields) { unfinishedYield.Add(yield); } return unfinishedYield; } )); }
public static PlanetType getTestPlanetType( ElementId?id = null, AbstractImage image = null, string name = "TestPlanetType", string desc = "TestDescription", YieldCalculator calc = null ) { ElementId _id = id.GetValueOrDefault(0); image = image ?? AbstractResourceTest.GetTestAbstractImage(); calc = calc ?? NULL_YIELD; return(TestConstructor.testBuildObject( () => new PlanetType( id: _id, icon: image, name: name, description: desc, yieldCalculator: calc ) )); }
public static ClusterType getTestClusterType( ElementId?id = null, AbstractImage image = null, string name = "TestClusterType", string desc = "TestDescription", YieldModifier mod = null ) { ElementId _id = id.GetValueOrDefault(0); image = image ?? AbstractResourceTest.GetTestAbstractImage(); mod = mod ?? NOOP_MODIFIER; return(TestConstructor.testBuildObject( () => new ClusterType( id: _id, icon: image, name: name, description: desc, yieldModifier: mod ) )); }
public static void Test15() { TestConstructor test = new TestConstructor(); test.ArrayLengthTest(); }