public void VerifyThatToDtoThrowsException() { var name = "nothing"; var nothing = new NotThing(name); Assert.Throws <NotSupportedException>(() => nothing.ToDto()); }
public void VerifyThatResolvePropertiesThrowsException() { var name = "nothing"; var nothing = new NotThing(name); Assert.Throws <NotSupportedException>(() => nothing.ResolveProperties(null)); }
public void VerifyThatGenericCloneThrowsException() { var name = "nothing"; var nothing = new NotThing(name); Assert.Throws <NotSupportedException>(() => nothing.Clone(false)); }
public void VerifyThatIconIsReturnedForAllClassKindGrayScale() { var assembly = Assembly.GetAssembly(typeof(Thing)); var values = Enum.GetValues(typeof(ClassKind)).Cast <ClassKind>().Select(x => x.ToString()).ToList(); foreach (var type in assembly.GetTypes()) { if (!values.Contains(type.Name) || type.FullName.Contains("DTO")) { continue; } Thing thing; if (type.Name == "NotThing") { thing = new NotThing("a"); } else { if (type.IsAbstract) { continue; } thing = (Thing)Activator.CreateInstance(type, Guid.NewGuid(), null, null); } var converterResult = this.converter.Convert(new object[] { thing, RowStatusKind.Inactive }, null, null, null); Assert.IsNotNull(converterResult); } }
public void VerifyThatConstructorSetsProperties() { var name = "nothing"; var nothing = new NotThing(name); Assert.AreEqual(name, nothing.Name); Assert.IsNull(nothing.Container); Assert.AreEqual(ClassKind.NotThing, nothing.ClassKind); }
public void VerifyThatTopContainerOfNotThingIsNull() { var nothing = new NotThing("nothing"); Assert.IsNull(nothing.TopContainer); }
public void VerifyThatRouteOfNothingReturnsExpectedString() { var nothing = new NotThing("nothing"); Assert.AreEqual("no thing, no route", nothing.Route); }
public void VerifyThatAnyOtherClassThanEnumerationValueDefinitionGetsConvertedToHyphen() { var notThing = new NotThing("nothing"); Assert.AreEqual("-", this.converter.Convert(notThing, null, null, null)); }