public void SaveGame_Null_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("game"), () => { m_target.SaveGame(null); }); }
public void SaveAvatar_NullWorld_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("world"), () => { EnvironmentHelper.SaveAvatar(MockRepository.GenerateMock <IEnvironment>(), null); }); }
public void CreateCrossoverByName_InvalidName_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("There is no ICrossover implementation with name 'Test'.", "name"), () => { CrossoverService.CreateCrossoverByName("Test"); }); }
public void SaveDeveloper_Null_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("developer"), () => { m_target.SaveDeveloper(null); }); }
public void GetJob_InvalidJob_Exception() { ExceptionAssert.IsThrowing(new ConfigurationErrorsException("Job with name 'Test' was not found."), () => { JobService.GetJob("Test"); }); }
public void GetGenerationStrategyTypeByName_InvalidName_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("There is no IGenerationStrategy implementation with name 'Test'.", "name"), () => { PopulationService.GetGenerationStrategyTypeByName("Test"); }); }
public void Constructor_NullFitness_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("fitness"), () => { new GeneticAlgorithm(new Population(2, 2, new ChromosomeStub()), null, null, null, null); }); }
public void SavePerson_Null_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("person"), () => { m_target.SavePerson(null); }); }
public void CreateSelectionByName_InvalidName_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("There is no ISelection implementation with name 'Test'.", "name"), () => { SelectionService.CreateSelectionByName("Test"); }); }
public void SaveLanguage_Null_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("language"), () => { m_target.SaveLanguage(null); }); }
public void DeletePerson_PersonNotExistis_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("Person with key '0' does not exists."), () => { m_target.DeletePerson(0); }); }
public void DeleteLanguage_LanguageNotExistis_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("Language with key '0' does not exists."), () => { m_target.DeleteLanguage(0); }); }
public void SavePlatform_Null_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("platform"), () => { m_target.SavePlatform(null); }); }
public void DeletePlatform_PlatformNotExistis_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("Platform with key '0' does not exists."), () => { m_target.DeletePlatform(0); }); }
public void GetEntityByKey_DoesNotExistsEntityWithName_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("There is no entity with the name 'Jogo'."), () => { ServiceFacade.GetEntity("Jogo", 1); }); }
public void CreateSelectionByName_ValidNameButInvalidConstructorArgs_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("A ISelection's implementation with name 'Elite' was found, but seems the constructor args were invalid.", "constructorArgs"), () => { SelectionService.CreateSelectionByName("Elite", 1); }); }
public void CreateGenerationStrategyByName_ValidNameButInvalidConstructorArgs_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("A IGenerationStrategy's implementation with name 'Tracking' was found, but seems the constructor args were invalid.", "constructorArgs"), () => { PopulationService.CreateGenerationStrategyByName("Tracking", 1); }); }
public void CreateMutationByName_ValidNameButInvalidConstructorArgs_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("A IMutation's implementation with name 'Uniform' was found, but seems the constructor args were invalid.", "constructorArgs"), () => { MutationService.CreateMutationByName("Uniform", 1f); }); }
public void Constructor_NullPopulation_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("population"), () => { new GeneticAlgorithm(null, null, null, null, null); }); }
public void GetMutationTypeByName_InvalidName_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("There is no IMutation implementation with name 'Test'.", "name"), () => { MutationService.GetMutationTypeByName("Test"); }); }
public void Constructor_NullSelection_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("selection"), () => { new GeneticAlgorithm(new Population(2, 2, new ChromosomeStub()), MockRepository.GenerateMock <IFitness>(), null, null, null); }); }
public void SaveCompany_Null_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("company"), () => { m_target.SaveCompany(null); }); }
public void DeleteDeveloper_DeveloperNotExistis_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("Developer with Id '0' does not exists."), () => { m_target.DeleteDeveloper(0); }); }
public void DeleteCompany_CompanyNotExistis_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("Company with key '0' does not exists."), () => { m_target.DeleteCompany(0); }); }
public void SaveAvatar_NullEnvironment_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("environment"), () => { EnvironmentHelper.SaveAvatar((IEnvironment)null, new World()); }); }
public void Constructor_OneCity_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("The minimum length for a chromosome is 2 genes."), () => { new TspChromosome(1); }); }
public void SaveAvatar_AvatarUnavailable_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("Is impossible save the avatar because the environemnt has no UIInformation about it.", "environment"), () => { EnvironmentHelper.SaveAvatar(MockRepository.GenerateMock <IEnvironment>(), new World()); }); }
public void CreateService_Null_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("entity"), () => { ServiceFacade.CreateService(null); }); }
public void CreateCrossoverByName_ValidNameButInvalidConstructorArgs_Exception() { ExceptionAssert.IsThrowing(new ArgumentException("A ICrossover's implementation with name 'One-Point' was found, but seems the constructor args were invalid.", "constructorArgs"), () => { CrossoverService.CreateCrossoverByName("One-Point", 1, 2, 3); }); }
public void SaveAppliedTag_Null_Exception() { ExceptionAssert.IsThrowing(new ArgumentNullException("appliedtag"), () => { m_target.SaveAppliedTag(null); }); }