public void WhenCallingLink__ShouldReturnLuaCopyTask() { BuildComponentFactoryStub factoryStub = new BuildComponentFactoryStub(); EawCiLuaEnvironment sut = new EawCiLuaEnvironment(factoryStub, _luaParser); ILuaTask actual = sut.Link(string.Empty, string.Empty); Assert.IsInstanceOfType(actual, typeof(LuaCopyTask)); }
public void WhenCallingClean__ShouldReturnLuaCleanTask() { BuildComponentFactorySpy factorySpy = new BuildComponentFactorySpy(); EawCiLuaEnvironment sut = new EawCiLuaEnvironment(factorySpy, _luaParser); ILuaTask actual = sut.Clean(string.Empty); Assert.IsInstanceOfType(actual, typeof(LuaCleanTask)); }
public void WhenCallingRunProcess__ShouldCallBuildComponentFactoryWithRunProgramTaskName() { BuildComponentFactorySpy factorySpy = new BuildComponentFactorySpy(); EawCiLuaEnvironment sut = new EawCiLuaEnvironment(factorySpy, _luaParser); sut.RunProcess(string.Empty); Assert.AreSame("RunProgram", factorySpy.ActualTaskTypeName); }
public void WhenCallingClean__ShouldCallBuildComponentFactoryWithCleanTaskName() { BuildComponentFactorySpy factorySpy = new BuildComponentFactorySpy(); EawCiLuaEnvironment sut = new EawCiLuaEnvironment(factorySpy, _luaParser); sut.Clean(string.Empty); Assert.AreSame("Clean", factorySpy.ActualTaskTypeName); }
public void WhenCallingLink__ShouldCallBuildComponentFactoryWithSoftCopyTaskName() { BuildComponentFactorySpy factorySpy = new BuildComponentFactorySpy(); EawCiLuaEnvironment sut = new EawCiLuaEnvironment(factorySpy, _luaParser); sut.Link(string.Empty, string.Empty); Assert.AreSame("SoftCopy", factorySpy.ActualTaskTypeName); }
public void GivenNewEawCiLuaEnvironment__OnCreation__ShouldPushVisibilityTableToLuaEnvironment() { EawCiLuaEnvironment sut = new EawCiLuaEnvironment(new BuildComponentFactoryStub(), _luaParser); LuaTable visibilityTable = _luaParser.Lua.GetTable("visibility"); Assert.AreEqual(visibilityTable["private"], WorkshopItemVisibility.Private); Assert.AreEqual(visibilityTable["public"], WorkshopItemVisibility.Public); }
public void WhenCallingUpdateSteamWorkshopItem__ShouldReturnLuaUpdateSteamWorkshopItemTask() { BuildComponentFactorySpy factorySpy = new BuildComponentFactorySpy(); EawCiLuaEnvironment sut = new EawCiLuaEnvironment(factorySpy, _luaParser); LuaTable table = MakeLuaTable(_luaParser.Lua, "the_table"); ILuaTask actual = sut.UpdateSteamWorkshopItem(table); Assert.IsInstanceOfType(actual, typeof(LuaUpdateSteamWorkshopItemTask)); }
WhenCallingUpdateSteamWorkshopItem__ShouldCallBuildComponentFactoryWithUpdateWorkshopItemTaskName() { BuildComponentFactorySpy factorySpy = new BuildComponentFactorySpy(); EawCiLuaEnvironment sut = new EawCiLuaEnvironment(factorySpy, _luaParser); LuaTable table = MakeLuaTable(_luaParser.Lua, "the_table"); sut.UpdateSteamWorkshopItem(table); Assert.AreSame("UpdateSteamWorkshopItem", factorySpy.ActualTaskTypeName); }