public void ArraySeq_has_correct_count_1() { object[] array = new object[] { 1, 2, 3 }; IArraySeq a = ArraySeq.create(array); Expect(((Counted)a).count()).To.Equal(3); }
public void Create_on_array_and_index_creates() { object[] array = new object[] { 1, 2, 3 }; IArraySeq a = ArraySeq.create(array, 0); Expect(a).Not.To.Be.Null(); }
public void ArraySeq_has_correct_count_2() { object[] array = new object[] { 1, 2, 3 }; IArraySeq a = ArraySeq.create(array, 1); Expect(((Counted)a).count(), EqualTo(2)); }
public void Create_on_array_has_no_meta() { object[] array = new object[] { 1, 2, 3 }; IArraySeq a = ArraySeq.create(array); Expect(a.meta()).To.Be.Null(); }
public void Create_on_array_creates() { object[] array = new object[] { 1, 2, 3 }; IArraySeq a = ArraySeq.create(array); Expect(a, Not.Null); }
public void ArraySeq_has_correct_count_1() { object[] array = new object[] { 1, 2, 3 }; ArraySeq a = ArraySeq.create(array); Expect(a.count(), EqualTo(3)); }
public void Create_on_array_and_index_with_high_index_returns_null() { object[] array = new object[] { 1, 2, 3 }; ArraySeq a = ArraySeq.create(array, 10); Expect(a, Null); }
public void Create_on_array_and_index_has_no_meta() { object[] array = new object[] { 1, 2, 3 }; ArraySeq a = ArraySeq.create(array, 0); Expect(a.meta(), Null); }
public void Setup() { _array0 = new object[] { 1, 2, 3 }; _array1 = new object[] { 2, 3 }; _a0 = ArraySeq.create(_array0); _a1 = ArraySeq.create(_array0, 1); }
public void Create_on_array_and_index_creates() { object[] array = new object[] { 1, 2, 3 }; ArraySeq a = ArraySeq.create(array, 0); Expect(a, Not.Null); }
public void Setup() { object[] array = new object[] { 1, 2, 3 }; _objWithNullMeta = _obj = ArraySeq.create(array, 0); _expectedType = typeof(ArraySeq_object); _testNoChange = false; }
public void ReduceWithStartIterates() { IFn fn = DummyFn.CreateForReduce(); object[] array = new object[] { 2, 3, 4 }; IArraySeq a = ArraySeq.create(array); object ret = a.reduce(fn, 20); Expect(ret, EqualTo(29)); }
public void ReduceWithStartIterates() { IFn fn = DummyFn.CreateForReduce(); object[] array = new object[] { 2, 3, 4 }; IArraySeq a = ArraySeq.create(array); object ret = a.reduce(fn, 20); Expect(ret).To.Be.An.Instance.Of <long>(); Expect((long)ret).To.Equal(29); }
public void ReduceWithNoStartIterates() { MockRepository mocks = new MockRepository(); IFn fn = mocks.StrictMock <IFn>(); RMExpect.Call(fn.invoke(2, 3)).Return(5); RMExpect.Call(fn.invoke(5, 4)).Return(7); mocks.ReplayAll(); object[] array = new object[] { 2, 3, 4 }; ArraySeq a = ArraySeq.create(array); object ret = a.reduce(fn); Expect(ret, EqualTo(7)); mocks.VerifyAll(); }
public void Create_on_null_returns_null() { ArraySeq a = ArraySeq.create(null); Expect(a, Null); }
public void Setup() { object[] array = new object[] { 1, 2, 3 }; _objWithNullMeta = _obj = ArraySeq.create(array, 0); _expectedType = typeof(ArraySeq); }
public void Create_on_null_returns_null() { IArraySeq a = ArraySeq.create(null); Expect(a).To.Be.Null(); }
public void Create_on_nothing_returns_null() { IArraySeq a = ArraySeq.create(); Expect(a, Null); }