public void CanGenerateChildProperty() { var value = Fake.Create <EnhancementEffect>(); Assert.NotNull(value.Effect); Assert.NotEqual(0, value.Effect.Aspect); }
public void CanGenerateEffect() { var value = Fake.Create <Effect>(); Assert.Equal(14, value.Aspect); Assert.Equal("MagnitudeExpression", value.MagnitudeExpression); Assert.Equal(3f, value.Magnitude); Assert.False(value.IgnoreEnhancementDiversification); }
public void CanGenerateArrayProperty() { var value = Fake.Create <Requirement>(); Assert.NotNull(value.ClassNames); Assert.Equal(2, value.ClassNames.Length); Assert.Equal("0", value.ClassNames[0]); Assert.Equal("1", value.ClassNames[1]); }
public void CanReadEffect() { var effect = Fake.Create <Effect>(); new ReaderTest(setup: (writer) => { new EffectWriter(writer).Write(effect); }, test: (reader) => { var record = new EffectReader(reader).Read(); Assert.Equal(effect, record); }).Run(); }
public void CanReadEnhancement() { var enhancement = Fake.Create <Enhancement>(); new ReaderTest( setup: (writer) => { new EnhancementWriter(writer).Write(enhancement); }, test: (reader) => { var record = new EnhancementReader(reader).Read(); Assert.Equal(enhancement, record); }).Run(); }
public void CanReadNamedEntity() { var namedEntity = Fake.Create <NamedEntity>(); new ReaderTest( setup: (writer) => { new NamedEntityWriter(writer).Write(namedEntity); }, test: (reader) => { var record = new NamedEntityReader(reader).Read(); Assert.Equal(namedEntity, record); }).Run(); }
public void CanReadEnhancementHeader() { var header = Fake.Create <EnhancementHeader>(); new ReaderTest( setup: (writer) => { new EnhancementHeaderWriter(writer).Write(header); }, test: (reader) => { var record = new EnhancementHeaderReader(reader).Read(); Assert.Equal(header, record); }).Run(); }
public void CanReadPowerset() { var powerset = Fake.Create <PowerSet>(); new ReaderTest( setup: (writer) => { new PowerSetWriter(writer).Write(powerset); }, test: (reader) => { var powersetReader = new PowerSetReader(reader); var record = powersetReader.Read(); Assert.Equal(powerset, record); }).Run(); }
public void CanReadVersionData() { var versionData = Fake.Create <VersionData>(); new ReaderTest( (writer) => { new VersionDataWriter(writer) .Write(versionData); }, (reader) => { var header = new VersionDataReader(reader).Read(); Assert.Equal(versionData, header); }).Run(); }
public void CanReadHeaderWithDate() { var issue12Header = Fake.Create <Issue12Header>(); new ReaderTest( setup: (writer) => { new Issue12HeaderWriter(writer).Write(issue12Header); }, test: (reader) => { var headerReader = new Issue12HeaderReader(reader); var header = headerReader.Read(); Assert.Equal(issue12Header, header); }).Run(); }
public void CanReadArchetype() { var archetype = Fake.Create <Archetype>(); new ReaderTest( setup: (writer) => { new ArchetypeWriter(writer).Write(archetype); }, test: (reader) => { var archetypeReader = new ArchetypeReader(reader); var record = archetypeReader.Read(); Assert.Equal(archetype, record); } ).Run(); }
public void CanReadPower() { var power = Fake.Create <Power>(); new ReaderTest( setup: (writer) => { var powerWriter = new PowerWriter(writer); powerWriter.Write(power); }, test: (reader) => { var powerReader = new PowerReader(reader); var record = powerReader.Read(); Assert.Equal(power, record); }).Run(); }
private void CanReadRecordHeader(string prefix) { var recordHeader = Fake.Create <RecordHeader>(); new ReaderTest( setup: (writer) => { writer.Write(recordHeader.Prefix); writer.Write(recordHeader.VersionData.Revision); writer.Write(recordHeader.VersionData.RevisionDate.ToBinary()); writer.Write(recordHeader.VersionData.SourceFile); writer.Write(recordHeader.Count); }, test: (reader) => { var header = new RecordHeaderReader(reader).Read(); Assert.Equal(recordHeader, header); }).Run(); }
public void CanReadHeaderWithYearMonthDay() { var issue12Header = Fake.Create <Issue12Header>(); new ReaderTest( setup: (writer) => { writer.Write(issue12Header.Description); writer.Write(issue12Header.Version); writer.Write(issue12Header.Date.Year); writer.Write(issue12Header.Date.Month); writer.Write(issue12Header.Date.Day); writer.Write(issue12Header.Issue); }, test: (reader) => { var headerReader = new Issue12HeaderReader(reader); var header = headerReader.Read(); Assert.Equal(issue12Header, header); }).Run(); }
public void CanGenerateInt() { var value = Fake.Create <int>(); Assert.Equal(0, value); }
public void CanGenerateString() { var value = Fake.Create <string>(); Assert.Equal(string.Empty, value); }
public void CanGenerateBoolean() { var value = Fake.Create <bool>(); Assert.False(value); }
public void CanGenerateFloat() { var value = Fake.Create <float>(); Assert.Equal(0f, value); }