public void PublicObject_WithReadonlyField_IsSuccess() { var target = new PublicObjectWithReadonlyField(_random.Next()); var syntax = CacheBuilder.CreateCache(target); var syntaxString = syntax.ToString(); Assert.IsNotNull(syntaxString); }
public override void Execute(SourceGeneratorContext context) { var target = new PublicObjectWithDefaultCtor { Value = new Random().Next() }; var syntax = CacheBuilder.CreateCache(target); context.AddCompilationUnit("Test", syntax); }
public void PublicObject_WithPrivateCtor_IsSuccess() { var target = PublicObjectWithPrivateCtor.Create(_random.Next()); var syntax = CacheBuilder.CreateCache(target); var syntaxString = syntax.ToString(); Assert.IsNotNull(syntaxString); }
public void PrivateObject_WithDefaultCtor_IsSuccess() { var target = new PrivateObjectWithDefaultCtorWrapper(); target.Intialize(_random.Next()); var syntax = CacheBuilder.CreateCache(target); var syntaxString = syntax.ToString(); Assert.IsNotNull(syntaxString); }
public void PublicField_IsSuccess() { var target = new PublicField(); target.Value = _random.Next(); var syntax = CacheBuilder.CreateCache(target); var syntaxString = syntax.ToString(); Assert.IsNotNull(syntaxString); }
public void PublicObject_WithGenerics_IsSuccess() { var target = new PublicObjectWithGenerics <int>() { Value = _random.Next() }; var syntax = CacheBuilder.CreateCache(target); var syntaxString = syntax.ToString(); Assert.IsNotNull(syntaxString); }
public void Inheritance_IsSuccess() { var target = new Inheritance() { BaseValue = _random.Next(), Value = _random.Next() }; var syntax = CacheBuilder.CreateCache(target); var syntaxString = syntax.ToString(); Assert.IsNotNull(syntaxString); }