public void WarewolfAtomIterator_GetNextValue_IsNotNull_ExpectTrue() { //-------------------------Arrange-------------------------- IEnumerable <DataStorage.WarewolfAtom> listResult = new List <DataStorage.WarewolfAtom>(); var warewolfAtomIterator = new WarewolfAtomIterator(listResult); //-------------------------Act------------------------------ warewolfAtomIterator.GetNextValue(); //-------------------------Assert--------------------------- Assert.IsNotNull(warewolfAtomIterator); }
public void WarewolfAtomIterator_GetNextValue_ShouldReturn() { IEnumerable <DataStorage.WarewolfAtom> listResult = new List <DataStorage.WarewolfAtom>(); var warewolfAtomIterator = new WarewolfAtomIterator(listResult); Assert.IsNotNull(warewolfAtomIterator); var privateObj = new PrivateObject(warewolfAtomIterator); privateObj.GetField("_listResult"); warewolfAtomIterator.GetNextValue(); }
public void GivenListResultIsNull_WarewolfAtomIterator_GetNextValue_ShouldReturnNull() { var warewolfAtomIterator = new WarewolfAtomIterator(new List <DataStorage.WarewolfAtom>()); Assert.IsNotNull(warewolfAtomIterator); var privateObj = new PrivateObject(warewolfAtomIterator); privateObj.GetField("_listResult"); privateObj.SetField("_listResult", null); Assert.IsNotNull(warewolfAtomIterator); Assert.IsNull(warewolfAtomIterator.GetNextValue()); }
public void WarewolfAtomIterator_GetNextValue_AreEqual_ExpectTrue() { //-------------------------Arrange-------------------------- IEnumerable <DataStorage.WarewolfAtom> listResult = new List <DataStorage.WarewolfAtom> { DataStorage.WarewolfAtom.NewDataString("a"), DataStorage.WarewolfAtom.NewDataString("b"), DataStorage.WarewolfAtom.NewDataString("c") }; var warewolfAtomIterator = new WarewolfAtomIterator(listResult); //-------------------------Act------------------------------ var value = warewolfAtomIterator.GetNextValue(); //-------------------------Assert--------------------------- Assert.AreEqual(listResult.First(), value); }
public void GivenListRes_WarewolfAtomIterator_GetNextValue_ShouldReturn() { IEnumerable <DataStorage.WarewolfAtom> listResult = new List <DataStorage.WarewolfAtom> { DataStorage.WarewolfAtom.NewDataString("a"), DataStorage.WarewolfAtom.NewDataString("b"), DataStorage.WarewolfAtom.NewDataString("c") }; var warewolfAtomIterator = new WarewolfAtomIterator(listResult); Assert.IsNotNull(warewolfAtomIterator); var privateObj = new PrivateObject(warewolfAtomIterator); privateObj.GetField("_listResult"); var value = warewolfAtomIterator.GetNextValue(); Assert.AreEqual(listResult.First(), value); }