Ejemplo n.º 1
0
        public void return_3_on_next_run_order_when_store_contains_2_instances()
        {
            var instanceOneId = Guid.NewGuid();
            var instanceTwoId = Guid.NewGuid();

            var instanceOne = new PackageToRun("PackageId", "InstanceOne", false, instanceOneId, 1, null);
            var instanceTwo = new PackageToRun("PackageId", "InstanceTwo", true, instanceTwoId, 2, null);

            var packageInstances = new PackagesInstances(_packageToRunStorage);

            packageInstances.AddInstanceToRun(instanceOne);
            packageInstances.AddInstanceToRun(instanceTwo);

            Check.That(packageInstances.GetNextRunOrderIndex()).IsEqualTo(3);
        }
Ejemplo n.º 2
0
        public void return_1_on_next_run_order_when_store_is_empty()
        {
            var packageInstances = new PackagesInstances(_packageToRunStorage);

            Check.That(packageInstances.GetNextRunOrderIndex()).IsEqualTo(1);
        }