public void IntAtomGetHashCodeTest() { const int value = 5; var atom = new IntAtom(value); atom.GetHashCode().Should().Be(value); }
public void IntAtomEqualsTest(int firstValue, int secondValue, bool expected) { var atom = new IntAtom(firstValue); var compareAtom = new IntAtom(secondValue); atom.Equals(compareAtom).Should().Be(expected); }
public void IntAtomLongTest() { const long value = 50001; var atom = new IntAtom(value); atom.Should().NotBeNull(); atom.Type.Should().Be(AtomType.Integer); atom.Value.Should().Be((int)value); }
public void IntAtomIntegerTest() { const int value = 5; var atom = new IntAtom(value); atom.Should().NotBeNull(); atom.Type.Should().Be(AtomType.Integer); atom.Value.Should().Be(value); }
public void IntAtomDumpNullParameterTest() { const int value = 5; var atom = new IntAtom(value); const string prefix = "Test"; Action act = () => atom.Dump(null, prefix); act.Should().Throw <ArgumentNullException>(); }
public void ListAtomGetAtomTest() { var atom1 = new IntAtom(15); var atom2 = new IntAtom(25); var atom3 = new IntAtom(35); var listAtom = new ListAtom { atom1, atom2, atom3 }; listAtom.Count.Should().Be(3); var actual = listAtom.Get(1); actual.Should().NotBeNull(); actual.Should().Be(atom2); }
public void IntAtomDumpTest() { var callback = false; var logger = A.Fake <ILogWrapper>(); A.CallTo(() => logger.InfoFormat(A <string> .Ignored, A <object> .Ignored, A <object> .Ignored)) .Invokes(() => callback = true); const int value = 5; var atom = new IntAtom(value); const string prefix = "Test"; atom.Dump(logger, prefix); callback.Should().BeTrue(); }