public void CustomerIDIsAPublicProperty() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicProperty <Customer, int>(c => c.ID); test.Execute(); }
public void LoggerIsAPublicClass() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicClass <Logger>(); test.Execute(); }
public void LoggerLogIsAPublicMethod() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicMethod <Logger, string>((l, s) => l.Log(s)); test.Execute(); }
public void TestFileContentIsPublicReadOnlyString() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicReadonlyProperty <TextFile, string>(t => t.Content); test.Execute(); }
public void RepositoryHasPublicDefaultConstructorThatTakesILogger() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicConstructor <ILogger, Repository <ICloneable> >(l => new Repository <ICloneable>(l)); test.Execute(); }
public void DieConstructorTakesIRandomAndInt() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicConstructor <string, ILogger>(s => new FileLogger(s)); test.Execute(); }
public void TemperatureKelvinIsPublicDoubleProperty() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicProperty <Temperature, double>(t => t.Kelvin); test.Execute(); }
public void ProductRepositoryGetMostExpensiveProductIsAPublicMethod() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicMethod <ProductRepository, Product>(r => r.GetMostExpensiveProduct()); test.Execute(); }
public void ProductRepositoryGetAverageProductPriceIsAPublicMethod() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicMethod <ProductRepository, decimal>(r => r.GetAverageProductPrice()); test.Execute(); }
public void ProductRepositoryDeleteIsAPublicMethod() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicMethod <ProductRepository, Product>((r, p) => r.Update(p)); test.Execute(); }
public void ProductRepositoryGetProductByIDIsAPublicMethod() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicMethod <ProductRepository, int, Product>((r, i) => r.GetProductByID(i)); test.Execute(); }
public void ProductIDISAPublicProperty() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicProperty <Product, int>(s => s.ID); test.Execute(); }
public void ProductRepositoryImplementsIEnumerable() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertClass <ProductRepository>(new TypeIsSubclassOfVerifier(typeof(IEnumerable <Product>))); test.Execute(); }
public void CustomerLastNameIsAPublicProperty() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicProperty <Customer, string>(c => c.LastName); test.Execute(); }
public void MyRandomImplementsIRandom() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertClass <MyRandom>(new TypeIsSubclassOfVerifier(typeof(IRandom))); test.Execute(); }
public void ProductRepositoryGetProductsInCategoryIsAPublicMethod() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicMethod <ProductRepository, string, IEnumerable <Product> >((r, s) => r.GetProductsInCategory(s)); test.Execute(); }
public void ArrayHelperIsAnStaticClass() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertType(typeof(ArrayHelper), new TypeIsStaticVerifier()); test.Execute(); }
public void ProductCategoryIsAPublicProperty() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicProperty <Product, string>(s => s.Category); test.Execute(); }
public void TemperatureImplementsIComparable() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertClass <Temperature>(new TypeIsSubclassOfVerifier(typeof(IComparable))); test.Execute(); }
public void ProductRepositoryGetProductCategoriesIsAPublicMethod() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicMethod <ProductRepository, IEnumerable <string> >(r => r.GetProductCategories()); test.Execute(); }
public void TextFileConstructorTakesString() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicConstructor <string, TextFile>(s => new TextFile(s)); test.Execute(); }
public void StudentAgeIsAPublicProperty() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicProperty <Product, decimal>(s => s.Price); test.Execute(); }
public void TextFileImplementsIDisposable() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertClass <TextFile>(new TypeIsSubclassOfVerifier(typeof(IDisposable))); test.Execute(); }
public void IRandomIsAnInterface() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertInterface <IRandom>(); test.Execute(); }
public void ILoggerIsAPublicInterface() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicInterface <ILogger>(); test.Execute(); }
public void IRandomNextOverloadTakesNothing() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertMethod <IRandom, int>(r => r.Next()); test.Execute(); }
public void LoggerImplementsILogger() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertClass <Logger>(new TypeIsSubclassOfVerifier(typeof(ILogger))); test.Execute(); }
public void IRandomNextOverlaodTakes2Ints() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertMethod <IRandom, int, int, int>((r, min, max) => r.Next(min, max)); test.Execute(); }
public void LoggerLogsIsAPublicListProperty() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicReadonlyProperty <Logger, List <string> >(l => l.Logs); test.Execute(); }
public void RadiusIsPublicDoubleProperty() { // TestTools Code StructureTest test = Factory.CreateStructureTest(); test.AssertPublicReadonlyProperty <Circle, double>(c => c.Radius); test.Execute(); }